How to use SCP command to transfer files
SCP (secure copy) is a command-line utility that allows you to securely copy files and directories between two locations.
SCP command syntax
scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
Every option is explained in manual that you can reach using command:
Copy Files and Directories between two systems with SCP
If SSH on the remote host is listening on a port other than default 22 then you can specify port using the -P
parameter:
To copy directory you need to use -r
parameter, that means recursive: