What is SCP?
SSH may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with SSH command there is SCP command. SCP is used to copy file(s) between servers in secure way.
- ssh- secure shell
- scp – secure copy
Basic syntax of SCP
$ scp abc.txt email@example.com:/tmp/
Provide modification times, access times, and modes from original files
$ scp -p abcd.pdf firstname.lastname@example.org:/tmp/
Make file transfer faster using -C parameter (compression)
$ scp -Cpv mail.log email@example.com:/tmp/
Copy files inside directory recursively
$ scp -r documents firstname.lastname@example.org:/tmp/
Copy files from remote server to local server
$ scp email@example.com:/path/to/file /local/path/