SCP – download a file from a remote server to a local machine

scp username@host:/path/to/hosts/file/host_file.txt ~/desktop

For Current Directory

scp username@host:/path/to/hosts/file/host_file.txt .

If you want to access EC2 (or other service that requires authenticating with a private key), use the -i option

scp -i key_file.pem your_username@remotehost.edu:/remote/dir/foobar.txt /local/dir

Copy something from this system to some other system:

scp /path/to/local/file username@hostname:/path/to/remote/file

Copy something from some system to some other system:

scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file 

References

http://www.hypexr.org/linux_scp_help.php

Leave a Reply

Your email address will not be published. Required fields are marked *