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 firstname.lastname@example.org:/tmp/
Provide modification times, access times, and modes from original files
$ scp -p abcd.pdf email@example.com:/tmp/
Make file transfer faster using -C parameter (compression)
$ scp -Cpv mail.log firstname.lastname@example.org:/tmp/
Copy files inside directory recursively
$ scp -r documents email@example.com:/tmp/
Copy files from remote server to local server
$ scp firstname.lastname@example.org:/path/to/file /local/path/