// free tool

SSH Config Generator

List your hosts and the key each should use, wildcards included. Get a ~/.ssh/config where every host resolves to exactly one key. Nothing leaves your browser.

~/.ssh/config

#How to use it

  1. Add one row per host or pattern: github.com, *.corp.example.com, web-??.prod, or * for "everything else".
  2. Name the private key file in ~/.ssh it should use (for example id_ed25519_work).
  3. Optionally set HostName (to create an alias like github.com-work), User and Port.
  4. Copy the result into ~/.ssh/config, then check a host with ssh -G hostname.

You can paste a URL or git remote into the host field: git@github.com:org/repo.git becomes github.com.

#What makes this generator different

Most generators print one Host block per row and stop. That leaves a trap: IdentityFile adds up across every matching block, so a *.corp.example.com rule also offers its key to git.corp.example.com. You end up with the wrong account or Too many authentication failures.

This generator:

  • orders rules from most to least specific,
  • adds !exclusions so broader wildcards skip hosts that have their own rule,
  • writes IdentitiesOnly yes so the agent can't slip in other keys.

The result: every host resolves to exactly one key. The wildcards guide explains why.

#Test before you rely on it

The Test a host box shows which rule wins for any host name, the same way SSH resolves it. After saving, confirm with:

Terminal
ssh -G wiki.corp.example.com | grep -E "^(identityfile|identitiesonly|hostname|user|port) "

Frequently asked questions

Is this SSH config generator safe to use?

Yes. It runs entirely in your browser: host names and key file names are never sent anywhere, and it never asks for private keys.

Why does the output contain !patterns?

IdentityFile adds up across every matching Host block, so a wildcard would also offer its key to more specific hosts. The generator excludes each more-specific overlapping pattern so every host gets exactly one key.

In what order are rules written?

Most specific first: exact host names before wildcards, then more literal characters, then fewer *. That's the same order the EasySSHConfig app uses.

Where do I put the result?

In ~/.ssh/config (create it with touch ~/.ssh/config and chmod 600 ~/.ssh/config). Keep your own Host blocks below it, then test with ssh -G hostname.