Skip to content
ZeroServer.tools

SSH Config Generator

Generate ~/.ssh/config entries from a form. Configure Host alias, HostName, User, Port, IdentityFile, and more.

Connection

Options

Advanced

Append to ~/.ssh/config

Host: myserverLines: 6Bytes: 130

What is ~/.ssh/config?

The SSH client configuration file (~/.ssh/config) lets you define shortcuts and options for SSH connections. Instead of typing ssh -i ~/.ssh/mykey -p 2222 [email protected], you define a Host alias and then just type ssh myserver. Common options: IdentityFile (which key to use), ForwardAgent (forward SSH agent for multi-hop), ServerAliveInterval (keep-alive pings), ProxyJump (jump hosts for bastion servers).

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Producing a host alias so a long connection command becomes one word.
  • Setting up a jump host entry without remembering the directive names.
  • Pinning an identity file to a specific host rather than offering every key.
  • Producing entries for several environments consistently.
  • Getting the syntax right for a directive you use rarely.

Frequently Asked Questions

Where does this file go and what permissions does it need?
`~/.ssh/config`, mode 600 (`chmod 600 ~/.ssh/config`). OpenSSH refuses to use a config file that is group- or world-writable, and it fails with a permissions error rather than silently ignoring the file.
What happens if two Host blocks match?
First match wins, per option — the opposite of most config formats. OpenSSH reads top to bottom and keeps the first value it sees for each keyword, so a later block cannot override an earlier one. Put specific hosts first and a `Host *` catch-all last.
What is ProxyJump for?
Reaching a host through a bastion: `ProxyJump bastion.example.com` makes SSH open the connection through that intermediate. It replaced the older `ProxyCommand ssh -W %h:%p` incantation in OpenSSH 7.3 and is both shorter and safer, since your key never lands on the bastion.
Why set ServerAliveInterval?
It sends an encrypted keepalive every N seconds so a NAT or firewall does not silently drop an idle session. Paired with `ServerAliveCountMax 3`, the client gives up after three missed replies — so at 60 seconds a dead link is detected in about three minutes.
Is turning off StrictHostKeyChecking safe?
No — it disables the protection against a man-in-the-middle, since the client will accept any key the server offers. `accept-new` is the reasonable middle ground: trust a host the first time, but still refuse if a known key ever changes.
How do I use different keys for two accounts on the same host?
Give each a distinct `Host` alias with its own `IdentityFile`, then use the alias in the remote URL. Add `IdentitiesOnly yes`, or the agent offers every loaded key and the server accepts whichever matches first.

Common errors and gotchas

  • Getting the file permissions wrong, which makes SSH refuse to use the config or the key.
  • Putting a wildcard host entry first, where its settings then apply to everything below it.
  • Confusing `Host` with `HostName`, where one is the alias and the other the real address.
  • Assuming later entries override earlier ones, when SSH takes the first value it finds.
  • Committing a config containing internal hostnames to a public repository.

Related Generators tools

Private & free — this tool runs entirely in your browser.

CloudwaysManaged cloud hosting on AWS, GCP & DO — from $11/mo.affiliate