SSH Cheat Sheet 2026 — Quick Command Reference
SSH Cheat Sheet is the complete quick-reference of SSH commands grouped by function. Copy any command with one click and find what you need with Ctrl+F in under 3 seconds.
SSH Connections & Tunnels
| Action | Command | Useful flags |
|---|---|---|
| Connect to a remote server |
|
|
| Connect to a remote server with a specific [i]dentity (private key) |
|
|
| Connect to a remote server with IP `10.0.0.1` and using a specific [p]ort (Note: |
|
|
| Run a command on a remote server with a [t]ty allocation allowing interaction wi |
|
|
| SSH tunneling: [D]ynamic port forwarding (SOCKS proxy on `localhost:1080`) |
|
|
| SSH tunneling: Forward a specific port (`localhost:9999` to `example.org:80`) al |
|
|
| SSH [J]umping: Connect through a jumphost to a remote server (Multiple jump hops |
|
|
| Close a hanged session |
|
|
⚠️ Dangerous / Destructive Commands
These commands are irreversible. Verify your environment (dev/staging vs prod) before running them.
| Action | Command | Warning |
|---|---|---|
| ⚠️ Destroy ⚠️ |
|
Irreversible — verify the target before running |
| ⚠️ Delete |
|
Irreversible — verify the target before running |
| ⚠️ Prune ⚠️ |
|
Irreversible — verify the target before running |
| ⚠️ Delete |
|
Irreversible — verify the target before running |
| ⚠️ Delete |
|
Irreversible — verify the target before running |
FAQ — Frequently Asked Questions
What is the difference between SSH Connections & Tunnels and the other groups?
Each group in this SSH cheat sheet covers a distinct area. SSH Connections & Tunnels focuses on its specific scope, while the other groups and the remaining groups cover networking, storage, security and diagnostics respectively.
How do I check the installed SSH version?
Run the version command (usually ssh version or ssh --version). The output shows the client and, when applicable, the server version.
Why does SSH return ‘permission denied’?
A ‘permission denied’ error in SSH usually means the current user lacks sufficient privileges or credentials are not configured. Check: (1) assigned IAM/RBAC roles, (2) an active authentication context via the corresponding login command.
How do I filter SSH output by status or name?
Use flags such as --filter, --selector or --query depending on the tool. You can also pipe into grep or jq to process JSON:
ssh list | grep RUNNING
What is the fastest way to debug a SSH error?
Add the verbose flag (--verbose, -v or --debug) to the failing command. This reveals the underlying HTTP/API calls and the full error response body.
Official sources & references
Commands cross-checked against vendor documentation and high-authority repositories: