$ ssh -i key.pem -p 2222 user@host
$ ssh -N -L 8080:localhost:80 host
| -i | use the given private key file |
| -p | connect to this port |
| -L | set up local port forwarding |
| -R | set up remote port forwarding |
| -D | set up a local SOCKS proxy (dynamic forwarding) |
| -N | do not run a remote command (forwarding only) |
| -f | go to the background after authenticating |
| -v | verbose — print debugging output |
| -t | force a pseudo-terminal |
| -o | set an ssh_config option (e.g. StrictHostKeyChecking=no) |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.