Using scp to copy files from remote to home machine

Share:
Secure Copy (scp)

To copy a file from your computer to another computer with scp go to a command-line and type

 scp <file> <username>@<IP address or hostname>:<Destination>  

For Example : Copy your test.zip file to your remote computer you need to write

 scp test.zip nikunj@servername.com: /var/www/test/  

This will copy test.zip to the remote computer hostname is servername.com username is nikunj and destination path is /var/www/test.

Attributes

-r  : Recursive

(Recursive) mean copy folders and it's sub-folder to the destination folder.

 scp -r /media/disk/summer_pics/ nikunj@192.168.1.1:"/var/www/Summer2014/"  


No comments

Ads