Copy files or folder from remote server to local machine.

Copy the file “foobar.txt” from a remote host to the local host

$ scp your_username@remotehost.edu:foobar.txt /some/local/directory

Copy the file “foobar.txt” from the local host to a remote host

$ scp foobar.txt your_username@remotehost.edu:/some/remote/directory

For Copying the folder use  “-r”

$ scp -r user@your.server.example.com:/path/to/foo /home/user/Desktop/
 
Reference : http://www.hypexr.org/linux_scp_help.php
Advertisements