SCP - secure copy. It is used to copy files between servers securely. The transfer can happen either between a local host and a remote host or between two remote hosts. SCP uses the same authentication and security procedure that is used by the SSH protocol.


The basic syntax is at follows:

scp <username>@<source-host>:<path to file> <username>@<destination-host>:<path to store file>


If you’re on your local wanting to receive a file from a remote server:

scp <username>@<remote-host>:/path/to/file /path/to/store


As for all linux commands you can get extra information about its usage by typing man <command-name> in the terminal.

Do a man scp to get more information about the scp command.

Cheers!



Sources: