Wednesday, 11 July 2012

Secure Coping files over ssh, between Linux, Mac or Windows


scp is secure cp (copy), which means we can copy files across ssh connection. That connection will be securely encrypted.

You can use scp to copy files from or to a remote server. You can also copy files from one remote server to another remote server, without passing traffic through your PC.

You can use scp on Linux, Mac and Windows (using WinSCP).


Copy files from a local computer to  remote computer

"scp fileName username@server:PathToLocate"

Example:
 scp test.zip kumar@192.168.1.1:/home/user/

Copy files from a remote server to your local computer

"scp username@server:FilePathToCopy/fileName  PathToLocate"

Example:
 scp kumar@192.168.1.1:/home/user/test.zip  /home/user/

Copy files from a remote server to another remote computer

"scp UserName1@server1:FilePathToCopy/fileName UserName2@server2:PathToLocate"

Example:
 scp kumar@192.168.1.1:/home/user/test.zip  looser@192.168.1.5:/home/user/

No comments:

Post a Comment