Copy files across computers via SSH

Copy from remote to remote machine:

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

Copy from local to remote machine:

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

Copy from remote to local:

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

Leave a Reply