SSH Config Generator
Write an SSH config file from one line per host, with users, ports, keys, jump hosts, port forwards and keep-alive settings, so ssh web just works.
How to build an SSH config file
List your hosts
One line each: a short alias, then user@host:port, then key=, jump=, forward= or agent as needed.
Pick the defaults
Keep-alive, IdentitiesOnly and connection sharing apply to every host.
Save it
Save as ~/.ssh/config and connect with ssh alias.
Worked example
This is what SSH Config Generator gives for its own sample values. Open the tool above and change anything to try your own.
Hosts, one per line: alias user@host:port key=... jump=... forward=... agent
bastion ops@bastion.example.com key=~/.ssh/id_ed25519 app1 deploy@10.0.1.21 jump=bastion key=~/.ssh/id_ed25519 db admin@10.0.2.5:2222 jump=bastion forward=5432:localhost:5432 github git@github.com key=~/.ssh/github_ed25519
- Keep idle connections alive
- Yes
- Only offer the named key (IdentitiesOnly)
- Yes
- Add keys to the agent on first use
- Yes
- Reuse connections (ControlMaster)
- No
~/.ssh/config
Host bastion
HostName bastion.example.com
User ops
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
Host app1
HostName 10.0.1.21
User deploy
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
ProxyJump bastion
Host db
...When to use SSH Config Generator
You connect to many servers and are tired of remembering users, ports and key files for each one.
Private servers can only be reached through a bastion host and you want to connect to them in one step.
Tips for a better SSH Config Generator result
Give every alias a short, memorable name and use the same names in Ansible or scripts, which read the same config.
Turn on connection sharing when you run many commands against the same host, such as with git or rsync.
SSH Config Generator: limits and what to check
SSH uses the first value it finds for each setting, so a Host * block above your hosts would override them.
Agent forwarding lets the remote server use your keys while you are connected, so only enable it for hosts you trust.
About SSH Config Generator
Stop typing long ssh commands. An SSH config gives each server a short name with its user, port and key, connects through a bastion with ProxyJump, sets up port forwards and keeps idle connections alive. The output puts the defaults block last, because SSH uses the first value it finds for each setting.
FAQs
What does ProxyJump do?
It connects through another host first, so ssh app1 can reach a private server through the bastion in one step.
Why IdentitiesOnly?
Without it SSH tries every key in your agent, and servers that allow few attempts can lock you out before it reaches the right one.
Does this work on Windows?
Yes. Windows OpenSSH reads C:\Users\you\.ssh\config the same way.