ssh-config

SSH Config Generator

Generate ~/.ssh/config files visually with templates for AWS EC2, GitHub, bastion hosts, and more. Import existing configs, add hosts in bulk, and preview your configuration in real-time.

Click a button above to add your first host
~/.ssh/config
1# SSH Config Generator
2# Add hosts to generate your ~/.ssh/config
3#
4# Usage: Save this file to ~/.ssh/config
5# Then connect with: ssh <host-alias>
6#
7# Example:
8# Host myserver
9# HostName 192.168.1.100
10# User admin
11# IdentityFile ~/.ssh/id_ed25519
12
0 hosts12 lines

How to Use This SSH Config Generator

1

Add Hosts

Select a template for quick setup (AWS, GitHub, etc.) or create a custom host. Fill in the hostname, user, port, and SSH key path. Advanced options are available for bastion hosts and keep-alive settings.

2

Preview Config

See your SSH config update in real-time as you add and modify hosts. The preview shows the exact content that will go into your ~/.ssh/config file with proper syntax highlighting.

3

Copy or Download

Copy the generated config to your clipboard or download it as a file. Save it to ~/.ssh/config and set permissions with chmod 600. Then connect using ssh host-alias.

SSH Config Options Reference

Complete guide to all SSH configuration options and what they do.

Basic Connection

Host
Alias for this connection. Use this name with ssh alias to connect.
HostName
The actual server address - IP (192.168.1.100) or domain (server.example.com).
User
Username for authentication. Common values: ubuntu, ec2-user, root, admin.
Port
SSH port number. Default is 22. Only specify if using a non-standard port.

SSH Key Authentication

IdentityFile
Path to your private SSH key. Example: ~/.ssh/id_ed25519 or ~/.ssh/aws-key.pem
IdentitiesOnly
When "yes", only use the specified IdentityFile. Prevents SSH from trying other keys. Recommended for security.
AddKeysToAgent
When "yes", automatically adds your key to ssh-agent after first use. No need to run ssh-add manually.

Connection Routing

ProxyJump
Jump through another host (bastion/jump server). Value is the Host alias of the intermediate server.
ForwardAgent
When "yes", forwards your local SSH agent to the remote host. Allows chained SSH connections. Use only with trusted hosts.

Security Options

StrictHostKeyChecking
yes - Reject unknown hosts (most secure)
accept-new - Auto-accept new hosts, reject changed keys
no - Accept all (not recommended)

Performance

Compression
When "yes", compresses data transfer. Useful for slow connections or large file transfers.

Keep-Alive Settings

ServerAliveInterval
Seconds between keep-alive packets. Prevents connection timeouts. Typical values: 30-120.
ServerAliveCountMax
Max missed keep-alive responses before disconnecting. Default is 3. Combined with Interval, determines total timeout.

Quick Copy SSH Config Examples

Ready-to-use SSH configurations. Copy, paste into ~/.ssh/config, and customize the values.

Simple Server
Host myserver
    HostName 192.168.1.100
    User admin
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    AddKeysToAgent yes
AWS EC2 Instance
Host aws-prod
    HostName ec2-xx-xxx-xx-xxx.compute-1.amazonaws.com
    User ec2-user
    IdentityFile ~/.ssh/aws-key.pem
    IdentitiesOnly yes
    AddKeysToAgent yes
    StrictHostKeyChecking accept-new
    ServerAliveInterval 60
GitHub SSH
Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    AddKeysToAgent yes
Bastion + Private Server
# Jump/Bastion Host
Host bastion
    HostName bastion.example.com
    User admin
    IdentityFile ~/.ssh/bastion_key
    IdentitiesOnly yes
    AddKeysToAgent yes
    ForwardAgent yes
    ServerAliveInterval 30

# Private Server via Bastion
Host private-db
    HostName 10.0.1.50
    User ubuntu
    IdentityFile ~/.ssh/private_key
    IdentitiesOnly yes
    AddKeysToAgent yes
    ProxyJump bastion
Home Lab / Raspberry Pi
Host pi
    HostName 192.168.1.100
    User pi
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    AddKeysToAgent yes

Host nas
    HostName 192.168.1.50
    User admin
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    AddKeysToAgent yes
    Compression yes
Corporate / Work Server
Host work-server
    HostName server.company.com
    User john.doe
    IdentityFile ~/.ssh/work_key
    IdentitiesOnly yes
    AddKeysToAgent yes
    StrictHostKeyChecking yes
    ServerAliveInterval 120
    ServerAliveCountMax 3
GitLab Self-Hosted
Host gitlab.company.com
    HostName gitlab.company.com
    User git
    Port 2222
    IdentityFile ~/.ssh/gitlab_key
    IdentitiesOnly yes
    AddKeysToAgent yes
    PreferredAuthentications publickey

SSH Config FAQ

The SSH config file (~/.ssh/config) allows you to create shortcuts for SSH connections. Instead of typing 'ssh -i ~/.ssh/key.pem ec2-user@192.168.1.100 -p 22', you can simply type 'ssh myserver'. It stores connection parameters like hostname, user, port, and identity file for each host you connect to.

Related Tools

About This SSH Config Generator

The SSH config file is a powerful way to manage multiple SSH connections without remembering complex command-line options. This tool provides a visual interface for creating and managing SSH host configurations, with built-in templates for common use cases like AWS EC2 instances, GitHub authentication, and bastion host setups.

All configuration happens entirely in your browser. No server addresses, usernames, or key paths are ever transmitted or stored. This client-side approach ensures your infrastructure details remain completely private. Import existing configs, make changes visually, and export the result - all without your sensitive connection information leaving your device.