PureDevTools

SSH Config Generator

Build ~/.ssh/config entries for servers, jump hosts, and Git services — copy and paste into your config file

All processing happens in your browser. No data is sent to any server.
Host #1

Host alias is required.

Leave blank if no jump host is needed.

ForwardAgent

Generated SSH Config

# SSH Config — generated by PureDevTools SSH Config Generator
# https://puredevtools.tools/ssh-config-generator


Host unnamed-host

Paste into ~/.ssh/config. Create the file if it does not exist yet.

You SSH into 8 servers daily: ssh -i ~/.ssh/prod-key -p 2222 deploy@prod-server.example.com. With an SSH config, that becomes ssh prod. But writing the ~/.ssh/config block means remembering the exact directive names — HostName (not Hostname), IdentityFile, ProxyJump (not ProxyCommand for modern setups), ServerAliveInterval — and getting the indentation right.

Why This Generator (Not a Text Editor)

SSH config syntax is simple but unforgiving — one wrong directive name and it silently falls back to defaults. This tool provides a visual form — fill in host alias, hostname, user, port, identity file, ProxyJump for bastion hosts, and keepalive settings. Includes presets for GitHub, GitLab, AWS EC2, and cloud VMs. Copy the correctly formatted config block. Everything runs in your browser.

What Is the SSH Config File?

The ~/.ssh/config file lets you define named shortcuts for SSH connections. Instead of typing long commands like:

ssh -i ~/.ssh/my-key.pem -p 2222 ubuntu@192.168.1.100

You define a Host block once and connect with just:

ssh myserver

The config file is read by the OpenSSH client on every connection, so every tool that uses SSH — including git, scp, rsync, and VS Code Remote — also benefits from your config entries.

SSH Config Directives Reference

DirectiveDescriptionExample
HostAlias used in ssh <alias>Host myserver
HostNameActual IP address or domainHostName 192.168.1.100
UserRemote login usernameUser ubuntu
PortSSH port (default: 22)Port 2222
IdentityFilePath to private keyIdentityFile ~/.ssh/id_ed25519
ProxyJumpJump through a bastion hostProxyJump bastion
ForwardAgentForward local SSH agent to remoteForwardAgent yes
ServerAliveIntervalKeep-alive ping interval in secondsServerAliveInterval 60
ServerAliveCountMaxMax unanswered keep-alive pings before disconnectServerAliveCountMax 3
StrictHostKeyCheckingHost key verification policyStrictHostKeyChecking accept-new

How to Use This Tool

  1. Add a host entry — Click “Add Host” to create a new host block.
  2. Fill in the fields — Enter your host alias, hostname or IP, username, and any optional settings. Leave fields blank to omit them from the output.
  3. Use a preset — Click a preset button (Basic Server, Bastion, GitHub, etc.) to auto-fill common configurations.
  4. Repeat for each host — Add as many host blocks as you need. They are all generated together.
  5. Copy the output — Click the Copy button and paste it into your ~/.ssh/config file.

Common SSH Config Patterns

Basic Server Connection

The simplest config entry replaces all the flags you’d pass on the command line:

Host myserver
    HostName 192.168.1.100
    User ubuntu
    IdentityFile ~/.ssh/id_rsa
    ServerAliveInterval 60
    ServerAliveCountMax 3

Bastion / Jump Host Setup

SSH through a bastion (jump) host to reach servers on a private network:

Host bastion
    HostName bastion.example.com
    User ubuntu
    IdentityFile ~/.ssh/id_ed25519
    ForwardAgent yes

Host internal-server
    HostName 10.0.0.50
    User ubuntu
    IdentityFile ~/.ssh/id_ed25519
    ProxyJump bastion

The ProxyJump directive replaces the older ProxyCommand ssh -W %h:%p bastion syntax and is supported in OpenSSH 7.3+.

GitHub and GitLab

Use separate keys for different Git hosting services:

Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_github

Host gitlab.com
    HostName gitlab.com
    User git
    IdentityFile ~/.ssh/id_ed25519_gitlab

AWS EC2 Instance

Host my-ec2
    HostName ec2-X-X-X-X.compute-1.amazonaws.com
    User ec2-user
    IdentityFile ~/.ssh/my-key.pem
    ServerAliveInterval 60
    StrictHostKeyChecking accept-new

StrictHostKeyChecking Options

ValueBehavior
(omit)Uses SSH default (ask) — prompts on first connection
yesRefuses to connect if host key is unknown or changed
noSilently accepts any host key (insecure — only for testing)
accept-newAutomatically accepts new keys, rejects changed keys (safe for new hosts)

Use accept-new for cloud VMs that are frequently re-created. Use yes for production servers where you need to detect MITM attacks.

ForwardAgent Considerations

ForwardAgent yes passes your local SSH agent through the connection, letting remote servers authenticate with your local keys. This is useful for:

Security note: Only enable ForwardAgent on hosts you fully trust. A compromised remote server with agent forwarding enabled can use your local keys to connect to other servers.

Applying Changes

After editing ~/.ssh/config:

Frequently Asked Questions

Where is the SSH config file on Windows? On Windows with OpenSSH (built-in since Windows 10), the config file is at C:\Users\YourName\.ssh\config. Git for Windows and WSL each have their own OpenSSH installation with separate config files.

Can I use wildcards in Host patterns? Yes. Host *.example.com matches any subdomain, and Host * sets defaults for all connections. More specific Host blocks take precedence over wildcard blocks.

What is the difference between IdentityFile and IdentitiesOnly? IdentityFile specifies which key to offer during authentication. Adding IdentitiesOnly yes tells the SSH client to use only the specified key and ignore any keys loaded in the agent. This prevents accidental authentication with the wrong key.

How do I use a non-standard port with git over SSH? Add the port in your SSH config and git will pick it up automatically:

Host github.com
    HostName ssh.github.com
    User git
    Port 443

This is the recommended workaround when port 22 is blocked by a firewall.

Is my config data sent to a server? No. All processing happens entirely in your browser. Your hostnames, usernames, and key paths are never transmitted to any server and remain completely private on your device.

Related Tools

More DevOps & Networking Tools