1001Ferramentas
🔑 Dev

~/.ssh/config Generator

Build Host entries for the SSH config file: HostName, User, Port, IdentityFile, ForwardAgent, ProxyJump. Ideal for managing multiple servers.

Stop retyping ssh with a pile of flags

If connecting to a server means remembering ssh -i ~/.ssh/key -p 2222 user@ip every single time, the ~/.ssh/config file fixes that: define an alias once and just type ssh myserver from then on. The syntax has a classic trap, though: Host is the alias, HostName is the real address, and swapping them is a common mistake. Fill in the fields (user, port, key, ProxyJump) and copy a ready block formatted the way OpenSSH expects.

The generator follows OpenSSH's own logic: options at their default value do not need to appear, so Port 22 is left out of the output. ProxyJump deserves attention: it is the modern way to reach a machine through a bastion host (ssh hops through the intermediate to the destination) and retires the old ProxyCommand-plus-netcat tricks. Order matters in the file too: OpenSSH applies the first occurrence of each option that matches the host, so specific blocks should come before generic ones.

Paste the block at the end of ~/.ssh/config (create the file if it does not exist) and keep it at permission 600, same as the private key. Enable ForwardAgent only for machines you genuinely trust: with it on, anyone with root on that server can use your keys for as long as the session lasts. The tool only formats text in your browser; no address, username or key path ever leaves your machine.

Frequently asked questions

What is the difference between Host and HostName?
Host is the alias you type in the command (ssh myserver); HostName is the real address (IP or domain). If HostName is omitted, SSH tries to connect to the alias itself.
What is ProxyJump for?
Reaching servers behind a bastion: ssh connects to the intermediate host first and hops to the destination in a single command. It is the config-file equivalent of the -J flag.
Can I have several entries in the same file?
Yes, as many as you want, each starting with Host. Generate one block per server here and paste them one after another into ~/.ssh/config.

Related Tools