SSH copy files

02.Jul.2010

If you are about to copy files from one server to another, you can do it without downloading them to your local computer, and then uploading them to other destination. You copy files in one command line only with enabled SSH on your server.

To achieve this, you should use scp command line (scp stands for secure copy). See SSH copy files snippet to understand the usage.

scp /local/file  username@hostname:/local/file/to/copy/to

Notice:

If this is your first time connecting to other server, you will probably be asked to accept RSA fingerprint. You should accept it.