SSH Config Generator
Build a ~/.ssh/config file for all your servers — aliases, identity files, jump hosts, keep-alive and security options — then copy or download it.
# Generated by SysAdmin Tools — tools.techtransit.org # SSH Config — copy to ~/.ssh/config Host * ServerAliveInterval 60 ServerAliveCountMax 3 # Add a server on the left to generate a Host entry
Advertisement
An ssh config generator builds a clean, correct ~/.ssh/config file so you can connect to any server with a short alias instead of a long command. Define your servers on the left — alias, hostname, user, port, and identity file — and a ready-to-paste config is written on the right in real time. Once saved, ssh myserver replaces ssh -i ~/.ssh/id_ed25519 -p 22 deploy@192.168.1.10.
The SSH config file is one of the most useful and underused features of OpenSSH. It lets you assign a Host alias to each server, pin a specific SSH identity file per host (essential when you manage multiple SSH keys), route connections through a SSH jump host with ProxyJump, and set sensible keep-alive and security defaults once under Host *. This ssh config builder generates all of that without you memorising directive names or their exact capitalisation.
Everything runs in your browser — no server, no accounts, nothing uploaded. Add as many servers as you need, reorder them, load an example to see the pattern, then copy the result or download it as a file named config (with no extension, because SSH reads ~/.ssh/config directly). Whether you're wondering how to create an SSH config file for the first time or standardising connection settings across a fleet, this tool gives you a correct starting point in seconds.
The generator covers the directives you reach for most: HostName, User, Port, IdentityFile, ConnectTimeout, ServerAliveInterval, ForwardAgent, StrictHostKeyChecking, Compression, and LogLevel — plus global defaults applied to every host.
How to Use the SSH Config Generator
- 1
Fill in the server details
Enter an alias (the shortcut you will type after ssh), the hostname or IP, the login user, the port, and optionally an identity file. The alias is the only required field — everything else is added only when provided.
- 2
Add advanced options if needed
Open the advanced panel to set per-server keep-alive intervals, ForwardAgent, StrictHostKeyChecking, Compression, or LogLevel. These are optional and only appear in the output when you set them.
- 3
Add the server and repeat
Click "Add Server" to append it to the list. Add as many as you like; each becomes its own Host block. Use the edit and delete buttons to change entries, and drag the handle to reorder them in the file.
- 4
Set global defaults (optional)
Open Global SSH Settings to configure the Host * block — ServerAliveInterval, ServerAliveCountMax, AddKeysToAgent, a default IdentityFile, and ConnectTimeout. These apply to every host unless a specific host overrides them.
- 5
Copy or download the config
The preview shows the complete file. Click "Copy Config" to paste into ~/.ssh/config, or "Download config" to save it as a file named config (no extension). Then run chmod 600 ~/.ssh/config to secure it.
Understanding the SSH Config File
~/.ssh/config file is read by the OpenSSH client every time you run ssh, scp, or sftp. It is organised into Host blocks. Each block starts with Host followed by an alias (or pattern), and the indented directives beneath it apply whenever that alias matches. The special pattern Host * matches every connection, which is why global defaults live there.
When you connect, SSH reads the file top to bottom and, for each directive, uses the first value that matches — so more specific Host blocks should come before broad patterns. A directive like IdentityFile ~/.ssh/id_ed25519 tells SSH which private key to offer for that host, which is how you cleanly manage multiple SSH keys across GitHub, work servers, and personal VPSes without -i flags.
Two categories are worth understanding. Keep-alive directives (ServerAliveInterval and ServerAliveCountMax) send periodic packets so idle sessions don't drop behind a NAT or firewall. Jump hosts (ProxyJump) let you reach a server that isn't directly accessible by transparently connecting through a bastion first — ssh internal-db can hop through bastion automatically once configured.| Field | Description |
|---|---|
| Host | Defines an alias (or pattern). The directives below it apply when you connect using that alias, e.g. ssh myserver. |
| HostName | The real IP address or domain SSH connects to. The alias can differ from the actual hostname. |
| User | The login username for that host, so you can omit user@ from the command. |
| Port | The SSH port on the server (default 22). Set this when the server listens on a non-standard port. |
| IdentityFile | Path to the private key to use for this host — the key way to manage multiple SSH keys per server. |
| ProxyJump | Routes the connection through a jump/bastion host first, e.g. ProxyJump bastion, to reach internal servers. |
| ServerAliveInterval | Seconds between keep-alive packets sent to the server to stop idle connections from dropping. |
| StrictHostKeyChecking | Controls host-key verification: yes (strict), no (insecure), or accept-new (trust on first use, then enforce). |
Advertisement
Common SSH Config Use Cases
Short aliases for frequent servers
Replace long ssh commands with memorable aliases. Instead of ssh -p 2222 deploy@203.0.113.10 you type ssh prod-web. The alias, port, user, and key are all remembered in the config.
A different key per server
Assign a specific IdentityFile to each Host block so the right private key is offered automatically — no more "Too many authentication failures" from SSH trying every key in your agent.
Reaching internal servers via a bastion
Use ProxyJump to hop through a jump host to servers with no public IP. Once configured, ssh internal-db connects through the bastion transparently, and scp works the same way.
Stable connections over flaky networks
Set ServerAliveInterval and ServerAliveCountMax globally under Host * so long-running SSH sessions survive brief network drops and idle timeouts on VPNs, NATs, and corporate firewalls.