Copy the file “file” from a remote host to the local host

$scp username@remotehost.com:file /some/local/directory

Copy the file “file” from the local host to a remote host

$ scp file your_username@remotehost.com:/some/remote/directory

Copy the file “file” from remote host “rh1.com” to remote host “rh2.com”

$ scp your_username@rh1.com:/some/remote/directory/file your_username@rh2.com:/some/remote/directory/

Copy the directory “dir” from the local host to a remote host’s directory “rdir”

$ scp -r dir your_username@remotehost.com:/some/remote/director

Copying the files “f1.txt” and “f2.txt” from the local host to your home directory on the remote host

 scp f1.txt f2.txt your_username@remotehost.com:~

Copy the file “file” from the local host to a remote host using port 2264

$ scp -P 2266 file your_username@remotehost.com:/some/remote

Copy multiple files from the remote host to your current directory on the local host

$ scp your_username@remotehost.com:/some/remote/directory/{

$ scp your_username@remotehost.com:~/{foo.txt,bar.txt}