Module – 12 LINUX SCP to transfer files

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

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>