1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 10:24:54 +02:00
tldr/common/ssh.md
Chirag a35006fece Corrected SSH parameter
Port number parameter is a p, not a capital P
2014-03-01 11:46:48 +05:30

673 B

SSH

Secure Shell is a protocol used to securely log onto remote systems. It can be used for logging or executing commands on a remote server.

  • connecting to a remote server

ssh {{username}}@{{remote_host}}

  • connecting to a remote server with specific port

ssh {{username}}@{{remote_host}} -p {{2222}}

  • run a command on a remote server

ssh {{remote_host}} "{{command -with -flags}}"

  • ssh tunneling: dynamic port forwarding (SOCKS proxy on localhost:9999)

ssh -D {{9999}} -C {{username}}@{{remote_host}}

  • ssh tunneling: forward a specific port (localhost:9999 to slashdot.org:80)

ssh -L {{9999}}:slashdot.org:80 {{username}}@{{remote_host}}