cheat/cheatsheets/ssh

24 lines
697 B
Plaintext
Raw Normal View History

2013-08-27 02:34:36 +02:00
# To ssh via pem file (which normally needs 0600 permissions):
ssh -i /path/to/file.pem user@example.com
2013-08-28 14:15:50 +02:00
# To connect on an non-standard port:
ssh -p 2222 user@example.com
# To execute a command on a remote server:
ssh -t user@example.com 'the-remote-command'
# To tunnel an x session over SSH:
ssh -X user@example.com
# To launch a specific x application over SSH:
ssh -X -t user@example.com 'chromium-browser'
# To create a SOCKS proxy on localhost and port 9999
ssh -D 9999 user@example.com
2014-03-27 15:44:06 +01:00
# -X use an xsession, -C compress data, "-c blowfish" use the encryption blowfish
ssh user@example.com -C -c blowfish -X
# For more information, see:
# http://unix.stackexchange.com/q/12755/44856