How to use
- For each server, enter an alias, an address (HostName), a user, a port and a private key path. Add a server creates more entries.
- Add a jump host (
ProxyJump) and port forwarding (LocalForward) if you need them. - Under Host *, choose shared defaults such as keep-alive, automatic key adding and the host key checking mode.
- Paste the result into
~/.ssh/configand runchmod 600 ~/.ssh/config. From then on,ssh aliasis all you type.
Settings
| Setting | Directive | Notes |
|---|---|---|
| Alias | Host |
The name used in ssh myserver. Several names separated by spaces, and * or ? patterns, are allowed |
| Address | HostName |
The real IP or domain |
| User and port | User, Port |
Port 22 is the default, so it is omitted |
| Private key | IdentityFile, IdentitiesOnly |
The key file to use. IdentitiesOnly stops ssh from trying other agent keys, which avoids failed attempts |
| Jump host | ProxyJump |
Connect through a bastion. Use commas for several hops, like ops@bastion:2222,jump2 |
| Port forwarding | LocalForward |
5433:localhost:5432 connects your local port 5433 to localhost:5432 on the server side |
| Keep-alive | ServerAliveInterval, ServerAliveCountMax |
Sends a probe every 60 seconds and disconnects after 3 unanswered probes |
| Host key checking | StrictHostKeyChecking |
accept-new auto-accepts hosts seen for the first time and refuses changed keys |
| Connection reuse | ControlMaster, ControlPersist |
Reuses one connection for repeated logins to the same server |
Example output
The defaults produce this:
Host myserver
HostName 203.0.113.10
User deploy
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
AddKeysToAgent yes
StrictHostKeyChecking accept-new
The Host * block always goes last. When the same option appears in several blocks, ssh uses the first value it finds, so specific servers must come first and shared defaults last for per-server values to win. The address is a documentation example IP (203.0.113.10).
Security notes
- Do not paste private key contents. This tool only takes the path to a key file; input that looks like a key is not used and triggers a warning. It also flags the mistake of pointing
IdentityFileat a public key (.pub). ForwardAgent yeslets an administrator or attacker on the server use your agent to reach other servers. Use it only for trusted servers, and for bastion setupsProxyJumpis safer.- This tool never generates
StrictHostKeyChecking no, because it turns off the check that protects against man-in-the-middle attacks. - Your config file should be writable only by you (
chmod 600); ssh refuses files with loose permissions. The chmod Calculator helps with the digits. - Review the generated config before use.
ssh -G aliasprints the values ssh will actually apply. - Server-side firewall rules can be written with the Firewall Rule Generator, running an app as a service with the systemd Service Generator, and login passwords with the Password Generator. For internal network math see the IP Subnet Calculator.
Frequently asked questions
How do I create an SSH key?
Run ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 in a terminal to create a private key and a public key (.pub). Put the public key in the server’s ~/.ssh/authorized_keys, which ssh-copy-id can do for you. Never share the private key.
What is the difference between the Host alias and HostName?
Host is the name you type on the command line, and HostName is the address actually connected to. With Host prod and HostName 203.0.113.10, ssh prod connects to that address.
What if my settings do not seem to apply?
Run ssh -G alias to see the final values. If Host * comes first, its values win and the per-server values below it are ignored. A file whose mode is not 600 is ignored too.
What if my connection keeps dropping?
Sending periodic probes with ServerAliveInterval 60 and ServerAliveCountMax 3 reduces idle disconnects by NAT devices and firewalls.
Is my input sent to a server?
No. The config is generated in your browser.
Your input is processed in this browser and never sent to a server.