scp command Tutorial

Syntax

scp [-12346BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] 
[-o ssh_option] [-P port] [-S program] 
[[user@]host1:]file1 ... [[user@]host2:]file2
 

Examples

Copy one single local file to a remote destination 

#scp /path/to/source-file user@host:/path/to/destination-folder/

 

Copy one single file from a remote server to your current local server

#scp user@host:/path/to/source-file /path/to/destination-folder

 

Copy one single file from a remote server to another remote server

#scp user1@server1:/path/to/file user2@server2:/path/to/folder/

 

Copy multiple files with one command

#scp file1.txt file2.txt file3.txt pete@host.example.com:/home/pete/

 

Copy all files in a folder recursively to a remote server

#scp -r /home/user/html/* jane@host.example.com:/home/jane/backup/

====================================

https://www.garron.me/en/articles/scp.html