Ticker

6/recent/ticker-posts

Ad Code

SCP COMMAND

 

SCP COMMAND 


# scp source destination

The following command will copy the file /files/file.txt from the remote host 172.10.10.1 to the directory /files on the remote host 172.10.10.2.

# scp user1@172.10.10.1:/files/file.txt user_name@172.10.10.2:/files



To copy a file from a local to a remote system run the following command:

# scp file.txt remote_username@172.10.10.2:/remote/directory


if key based authentication then

#scp -i key.pem file.txt remote_username@172.10.10.2:/remote/directory


To copy a file from remote system to local


# scp -i key.pem remote_username@172.10.0.2:/remote/directory/file.txt /local/diectory/


if your are copying a directory then use -r


# scp -r -i key.pem remote_username@172.10.0.2:/remote/directory/ /local/diectory/

Post a Comment

0 Comments