1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 09:38:01 +01:00
tldr/pages/common/ssh.md

33 lines
871 B
Markdown
Raw Normal View History

# 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.
2014-01-31 16:31:35 +01:00
- connecting to a remote server
`ssh {{username}}@{{remote_host}}`
2014-01-31 16:31:35 +01:00
- connecting to a remote server with a specific identity (private key)
`ssh -i {{/path/to/key_file}} {{username}}@{{remote_host}}`
2014-01-31 16:31:35 +01:00
- connecting to a remote server with specific port
`ssh {{username}}@{{remote_host}} -p {{2222}}`
2014-01-31 16:31:35 +01:00
- run a command on a remote server
2015-10-22 09:31:52 +02:00
`ssh {{remote_host}} "{{command -with -flags}}"`
2015-10-22 09:31:52 +02:00
- 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}}`
2015-10-22 09:31:52 +02:00
- ssh enable agent forward
2014-08-27 00:36:49 +02:00
`ssh -A {{username}}@{{remote_host}}`