SSH Config Generator

Build your ~/.ssh/config one host at a time. Add as many hosts as you need, then copy the whole file.

0 hosts
~/.ssh/config
# Add a host above to start building the file.

Save the result to ~/.ssh/config, then connect with ssh alias. The config file should be private: chmod 600 ~/.ssh/config. Entries are matched top to bottom and the first match wins, so put specific hosts above any Host * defaults.

SSH Config Generator for ~/.ssh/config

Typing ssh -i ~/.ssh/prod_key -p 2222 [email protected] forty times a week is a self-inflicted wound. A well-kept SSH config file reduces that whole line to ssh prod. This generator builds the file for you, host by host, and handles the option names and indentation that are easy to get slightly wrong by hand.

Using it takes four steps

  1. Enter an alias (the short name you’ll type) and the real HostName, which can be an IP or a domain.
  2. Add whatever applies: user, port, identity file, or a ProxyJump bastion for hosts behind a gateway.
  3. Tick the option boxes. Keep-alive is on by default; agent forwarding, IdentitiesOnly and X11 are one click each.
  4. Press “Add host to config” and repeat for the next server. The file grows in the preview below, and one Copy button grabs everything.

Details it gets right for you

Port 22 is omitted since it’s the default, invalid port numbers are rejected before they reach the file, and keep-alive entries include both ServerAliveInterval and ServerAliveCountMax as a pair. The footer text reminds you of two rules that trip people up: the config file wants chmod 600, and SSH matches entries top to bottom with the first match winning, so specific hosts belong above any Host * block.

Speaking of the 600 mode, the Chmod Permissions Calculator shows precisely what it grants. Once your aliases work, most remote sessions start with hunting for files or reading logs, and the Find Command Composer and Grep/Sed Regex Tester cover both.

More tools from CommandLinux

SSH Config Generator Chmod Permissions Calculator Grep/Sed Regex Tester Find Command Composer Crontab Decoder Systemd Service Generator Tar Command Builder IP Subnet Calculator Bash Script Boilerplate Generator Command Line Quiz

Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.