ssh Command Generator
Generate ssh commands to connect to a remote host
Getting Started with ssh
## What is ssh?
`ssh` (secure shell) opens an encrypted terminal session on a remote host. The host is given as `user@host`; if you omit the user, ssh logs in with your current local username.
## How to Use
1. **Enter User and Host**: e.g. user `root`, host `example.com` → `root@example.com`. 2. **Set Options** (optional): `-p` for a non-default port, `-i` for a specific private key. 3. **Add a Command** (optional): run one command and return instead of opening a shell. 4. **Copy & Run**: paste the generated command into your terminal.
Flags & Patterns
``` ssh root@example.com ssh -i ~/.ssh/deploy_key -p 2222 example.com ssh user@host ls -la ```
### Common flags - `-p <port>` — connect to this port (default 22) - `-i <key>` — use this private key file - `-v` — verbose (debug connection issues) - `-C` — compress data (slow links) - `-t` — force a pseudo-terminal (needed for sudo/remote editors) - `-X` — enable X11 forwarding (run remote GUI apps)
### Tips - Put your public key in `~/.ssh/authorized_keys` on the host to log in without a password. - A command at the end runs once and disconnects: `ssh host uname -a`.
▶How do I connect on a non-default port?
▶How do I use a specific SSH key?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee