Home > Linux, System Administration > Use of SCP Command

Use of SCP Command

Sometimes you need to copy a file from or to a remote hosts. We use the scp command not only in a different but efficient way to copy the file from or to the remote hosts not logging into that remote host.

The syntax is as follows-

* Copy from Remote Host:

  $ scp  username@<remote-host-name/IP>:<remote-host-file-name-with-location>  <path-you-want-to-keep-file>
  $ scp jamee@ /home/oleen

* Copy to Remote Host:

 $ scp <file-name-with-location> <remote-host-name/IP>:<remote-host-path-you-want-to-keep-file>

 $ scp /home/jamee/jamee.gz jamee@

Just add a " -r " before directory name in case of copying a diretory.
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: