Copy from a remote Server

We can copy from and copy to a remote server using scp command. scp means secure copy. The structure of the command is as follows:

scp source destination

Suppose I want to copy to 192.168.100.5 . We want to copy the /etc/passwd to the remote server at /root .

Then we have to use the following command:

scp /etc/passwd root@192.168.100.5:/root

If we want to copy from 192.168.100.5 /etc/passwd file to /root, then we will write

scp root@192.168.100.5:/etc/passwd /root

We have to remind one thing that we must have to use root user for secure copy.

To copy a folder we have to use the following structure:

scp -r source destination

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: