SSH Config File Generator
Generate a ready-to-paste ~/.ssh/config Host block from a simple form — set the Host alias, HostName, User, Port, IdentityFile, ProxyJump, ServerAliveInterval, StrictHostKeyChecking and ForwardAgent/IdentitiesOnly options, plus a global Host * block. Runs entirely in your browser.
Input
The name you type after `ssh` (e.g. `ssh my-server`).
Global & output options
Output
Guides
The SSH Config File Generator builds a clean, ready-to-paste ~/.ssh/config Host block from a simple form. Instead of remembering the exact keyword spelling and indentation OpenSSH expects, fill in the fields you need and copy the generated block straight into your config file.
Why use an SSH config file
An SSH config file lets you replace long, error-prone commands like ssh -i ~/.ssh/id_ed25519 -p 2222 ubuntu@203.0.113.10 with a short alias — ssh my-server. It also stores per-host defaults (identity key, port, jump host, keep-alive interval) so every connection to that host behaves consistently across your terminal, Git, scp, and rsync. The file lives at ~/.ssh/config on macOS and Linux, and C:\Users\<you>\.ssh\config on Windows.
How to use this tool
- Enter a Host alias — the short name you'll type after
ssh(for examplemy-serverorgithub.com). - Fill in the connection details you need. Every field is optional except the alias; blank fields are simply left out of the output.
- Toggle the global and header options if you want an initial
Host *block or a descriptive comment. - Copy the generated block, or download it as a file named
config, and place it in~/.ssh/config.
Supported directives
- HostName — the real hostname or IP address to connect to.
- User — the login username.
- Port — a non-default SSH port.
- IdentityFile — path to the private key for this host.
- ProxyJump — a bastion/jump host to route the connection through.
- ServerAliveInterval — seconds between keep-alive packets to stop idle disconnects.
- StrictHostKeyChecking —
yes,accept-new,no, orask(or the OpenSSH default). - ForwardAgent — forward your local SSH agent to the remote host.
- IdentitiesOnly — only use the specified IdentityFile, ignoring other keys the agent offers.
- Global
Host *block — optionally addAddKeysToAgent yesand, on macOS,UseKeychain yesso passphrases are loaded automatically.
Formatting
The output follows the conventional OpenSSH style: each Host line is unindented, and its directives are indented by two spaces. Multiple sections (the header comment, the global Host * block, and your host entry) are separated by a blank line. This is purely a readability convention — OpenSSH does not require the indentation — but it keeps large config files easy to scan.
Can I add more than one host?
Yes. Generate one block per host and paste them one after another into the same ~/.ssh/config file. Directives under a Host line apply until the next Host line, so ordering matters only for wildcard patterns like Host *, which is why the global block is emitted first.
Is my data uploaded anywhere?
No. The config is generated entirely in your browser with client-side JavaScript. Hostnames, usernames, and key paths never leave your machine.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/ssh-config-file-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"host": "github.com",
"hostName": "github.com",
"user": "git",
"identityFile": "~/.ssh/id_ed25519",
"identitiesOnly": "true",
"includeHeader": "true"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `ssh-config-file-generator` tool (SSH Config File Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.