scp user1@host1.com:/files/file.txt user2@host2.com:/filesCopy
sudo apt update
sudo apt install openssh-server
sudo ufw allow ssh
scp source_location destination
'source_location' => location of the file you want to copy.
'destination' => location of the directory you want to paste the file.
Consider you want to copy file from the server in your current diractory
'scp root@server1:location/to/file .'