1. Home
  2. Developer
  3. SSH Config Generator

SSH Config Generator

Enter server addresses and key paths to get a ~/.ssh/config.

For every format and option in one place, use Server Config Generators →

Runs in your browser · No upload
Server 1
Enter a file path only. Never paste the contents of a private key.
e.g. ops@bastion.example.com:2222

Defaults for every server (Host *)

~/.ssh/config
# ~/.ssh/config Host myserver HostName 203.0.113.10 User deploy IdentityFile ~/.ssh/id_ed25519 IdentitiesOnly yes Host * ServerAliveInterval 60 ServerAliveCountMax 3 AddKeysToAgent yes StrictHostKeyChecking accept-new
Apply and verify
# ssh refuses a config that other users can write mkdir -p ~/.ssh && chmod 700 ~/.ssh chmod 600 ~/.ssh/config # generate a key if you do not have one (keep the private key to yourself) ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 # connect, copy files, and check the settings ssh will actually use ssh myserver scp ./file.txt myserver:/tmp/ ssh -G myserver | head -20
Review the generated config before use. Do not enter private key files or passwords into this tool, and keep the config file at mode 600.

Your input is processed in this browser and never sent to a server.

How to use

  1. For each server, enter an alias, an address (HostName), a user, a port and a private key path. Add a server creates more entries.
  2. Add a jump host (ProxyJump) and port forwarding (LocalForward) if you need them.
  3. Under Host *, choose shared defaults such as keep-alive, automatic key adding and the host key checking mode.
  4. Paste the result into ~/.ssh/config and run chmod 600 ~/.ssh/config. From then on, ssh alias is all you type.

Settings

Setting Directive Notes
Alias Host The name used in ssh myserver. Several names separated by spaces, and * or ? patterns, are allowed
Address HostName The real IP or domain
User and port User, Port Port 22 is the default, so it is omitted
Private key IdentityFile, IdentitiesOnly The key file to use. IdentitiesOnly stops ssh from trying other agent keys, which avoids failed attempts
Jump host ProxyJump Connect through a bastion. Use commas for several hops, like ops@bastion:2222,jump2
Port forwarding LocalForward 5433:localhost:5432 connects your local port 5433 to localhost:5432 on the server side
Keep-alive ServerAliveInterval, ServerAliveCountMax Sends a probe every 60 seconds and disconnects after 3 unanswered probes
Host key checking StrictHostKeyChecking accept-new auto-accepts hosts seen for the first time and refuses changed keys
Connection reuse ControlMaster, ControlPersist Reuses one connection for repeated logins to the same server

Example output

The defaults produce this:

Host myserver
    HostName 203.0.113.10
    User deploy
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes

Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3
    AddKeysToAgent yes
    StrictHostKeyChecking accept-new

The Host * block always goes last. When the same option appears in several blocks, ssh uses the first value it finds, so specific servers must come first and shared defaults last for per-server values to win. The address is a documentation example IP (203.0.113.10).

Security notes

  • Do not paste private key contents. This tool only takes the path to a key file; input that looks like a key is not used and triggers a warning. It also flags the mistake of pointing IdentityFile at a public key (.pub).
  • ForwardAgent yes lets an administrator or attacker on the server use your agent to reach other servers. Use it only for trusted servers, and for bastion setups ProxyJump is safer.
  • This tool never generates StrictHostKeyChecking no, because it turns off the check that protects against man-in-the-middle attacks.
  • Your config file should be writable only by you (chmod 600); ssh refuses files with loose permissions. The chmod Calculator helps with the digits.
  • Review the generated config before use. ssh -G alias prints the values ssh will actually apply.
  • Server-side firewall rules can be written with the Firewall Rule Generator, running an app as a service with the systemd Service Generator, and login passwords with the Password Generator. For internal network math see the IP Subnet Calculator.

Frequently asked questions

How do I create an SSH key?

Run ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 in a terminal to create a private key and a public key (.pub). Put the public key in the server’s ~/.ssh/authorized_keys, which ssh-copy-id can do for you. Never share the private key.

What is the difference between the Host alias and HostName?

Host is the name you type on the command line, and HostName is the address actually connected to. With Host prod and HostName 203.0.113.10, ssh prod connects to that address.

What if my settings do not seem to apply?

Run ssh -G alias to see the final values. If Host * comes first, its values win and the per-server values below it are ignored. A file whose mode is not 600 is ignored too.

What if my connection keeps dropping?

Sending periodic probes with ServerAliveInterval 60 and ServerAliveCountMax 3 reduces idle disconnects by NAT devices and firewalls.

Is my input sent to a server?

No. The config is generated in your browser.

Your input is processed in this browser and never sent to a server.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.