scp is one of the most useful tools to keep around when you need to move files between machines over SSH.

I used it often for backups, quick transfers, and one-off server work where a heavier sync tool was unnecessary.

Basic form

1
scp [[user@]host1:]file1 ... [[user@]host2:]file2

That is enough for many everyday cases.

Download multiple files

If a remote server named google-server.com has twitter.txt and facebook.txt under /home/cliper/, you can download both in one command like this:

1
scp [email protected]:/home/cliper/\{twitter.txt,facebook.txt\} .

Download a single file

1
scp [email protected]:/home/cliper/twitter.txt .

Upload a file

If you want to upload a local file to server1.com:

1
scp /home/mylocal_linux_pc/file.txt [email protected]:/home/cliper/

There are plenty of other tools for transfer and synchronization, such as rsync, wget, or Git depending on the job, but scp remains a very handy option for fast direct copies.