# Copy remote file to local dir
scp user@remotehost.com:/remote/path/to/foobar.md /local/dest
# Copy local file to remote dir
scp foobar.md user@remotehost.com:/remote/dest
# Key files can be used (just like ssh)
scp -i my_key.pem foobar.md user@remotehost.com:/remote/dest
scp command is used to securely copy a file to or from a remote destination. If the file is in current working directly only filename is sufficient else full path is required which included the remote hostname e.g. remote_user@some_server.org:/path/to/file
scp localfile.txt /home/friend/share/
scp rocky@arena51.net:/home/rocky/game/data.txt ./
scp mars@universe.org:/beacon/light/bitmap.conf jupiter@universe.org:/beacon/night/
scp -r user@192.168.0.4:~/project/* ./workspace/