I have done copying files and even directories from remote servers before. However, this time it is more secure and password is not visible on the command line. Moreover, the file transfer goes through secure medium SSH.
Nothing fancy, this is how we do it.
scp user@server.net:file-under-user-home-dir.txt copied-file.txt scp user@server.net:dir-under-user-home-dir/some/file.txt /full/path/to/destination/file.txt scp user@server.net:/var/www/vhosts/somesite.com/backup.tar.gz . scp -r user@server.net:/var/www/vhosts/somesite.com/images . scp -r user@server.net:/var/www/vhosts/somesite.com/images /home/user/backup/sometime.com/images
In all these operations, the user is prompted to enter the password.
I use scp all the time. It’s very useful when it’s written in bash scripts by automating upload and download of remote files.
Yes it is, although a bit slower due to the additional security layer.
Thanks for visiting Sir Jed.