Skip to content

Instantly share code, notes, and snippets.

@Guibzs
Last active October 10, 2018 12:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Guibzs/66086c8ad771e2ffc3658f5607b26bfe to your computer and use it in GitHub Desktop.
Save Guibzs/66086c8ad771e2ffc3658f5607b26bfe to your computer and use it in GitHub Desktop.
SSH commands
ssh username@hostname
# Copy from another system to this system:
scp username@hostname:/path/to/remote/file /path/to/local/file
# Copy from this system to another system:
scp /path/to/local/file username@hostname:/path/to/remote/file
# Copy from some system to some other system:
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file
# Copy from another system to this system:
pscp username@hostname:/path/to/remote/file /path/to/local/file
# Copy from this system to another system:
pscp /path/to/local/file username@hostname:/path/to/remote/file
# Copy from another system to this system (using a keyfile):
pscp -i /path/to/keyfile.ppk username@hostname:/path/to/remote/file /path/to/local/file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment