What is Secure Copy (SCP)?
SCP allows to transfer copy of a file from one server to another server in linux. It uses SSH for data transfer and authentication.

Copy file from local host to remote host via ssh:
Syntax:
[code] $ scp -P PORT filename.ext [email protected]_name:/home/root/directory_path [/code]

Example:
[code] $ scp -P 2244 coddu_backup.zip [email protected]:/home/host-root/backups_directory [/code]

Copy file remote host to local host via ssh:
Syntax:

[code] $ scp [email protected]_name:filename.ext /home/local-host/directory_path [/code]

Example:
[code] $ scp [email protected]:coddu_backup.zip /home/local-host/backups_directory [/code]

Copy file from one remote host to another remote host via ssh:
Syntax:

[code] $ scp [email protected]_name_01:/home/remote-host-01/directory_path/filename.ext \ [email protected]_name_02:/home/remote-host-02/directory_path/ [/code]

Example:
[code] $ scp [email protected]:/home/remote-host-01/directory_path/filename.ext \ [email protected]:/home/remote-host-02/directory_path/ [/code]