GrepBoardTools GrepBoard manuals ↗ Log ↗

Tools / Server config

ssh_config generator

Fill in what you need — empty fields are left out. Then ssh myserver replaces ssh -i ~/.ssh/key -p 2222 deploy@203.0.113.10.

What you type is calculated only in your browser and is not sent to a server.

Connection

The short name you will type: ssh myserver. Letters, digits, . _ -

Real address — domain or IP. Empty: the alias itself is used as the address.

Login name on the server. Empty: your local user name.

Empty means 22.

Key

Private key path, e.g. ~/.ssh/id_ed25519. Spaces are quoted for you.

Offer only this key, not every key in the agent — avoids “Too many authentication failures”.

Jump host

Connect through a bastion: user@bastion:22, another alias, or several hops separated by commas.

Port forwarding

One per line: local_port host:port — e.g. 5433 localhost:5432 makes the server’s database reachable at your localhost:5433.

One per line: server_port host:port — the server’s port leads back to your side.

A local SOCKS proxy port, e.g. 1080.

Lets the server use your local ssh-agent. Only for servers you trust.

Keep the connection alive

Seconds between keep-alive messages (60 is common). 0 or empty: off.

Missed replies before giving up (default 3). Interval × count ≈ how long a dead link is tolerated.

Block for ~/.ssh/config
Host myserver
    HostName 203.0.113.10
    User deploy
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    ServerAliveInterval 60
    ServerAliveCountMax 3

What it does

Builds a Host block for the OpenSSH client config file ~/.ssh/config. With an alias you stop typing the address, user, port, key, bastion and forwards every time. Empty fields are left out; values ssh might not read the way you expect (an alias with spaces, a path containing %, …) produce no block and a reason next to the field.

Examples

You wantLines in the block
Port 2222 with a specific keyPort 2222 · IdentityFile ~/.ssh/id_ed25519 · IdentitiesOnly yes
Reach an internal server through a bastionProxyJump admin@bastion.example.com:22
The server's PostgreSQL on your port 5433LocalForward 5433 localhost:5432
Your dev server on 3000 as the server's 9000RemoteForward 9000 localhost:3000
A SOCKS proxy for the browserDynamicForward 1080
Idle connections that dropServerAliveInterval 60 · ServerAliveCountMax 3

Common mistakes

  • **Host * at the top — for each setting ssh uses the first value it finds**. A User root under Host * at the top wins over the User in later blocks. Put shared defaults at the end of the file.
  • A config file others can write — ssh refuses it with "Bad owner or permissions". Keep it chmod 600.
  • Too many keys — with several keys in the agent, ssh offers them one by one and hits the server's limit. Use IdentitiesOnly yes together with IdentityFile.

How it was checked

Before publishing, 32 generated blocks were read back with OpenSSH 9.6p1 ssh -G -F <temp file> <alias> (prints the final settings and exits without connecting), 99 checks in total. A Host * block was appended to confirm the specific block wins, empty fields were checked to fall back to the defaults (port 22, alias as the address), and invalid input was confirmed to produce no block.

FAQ

Can I check the config without connecting?

ssh -G alias prints the final settings for that alias and exits. Filter what you need: ssh -G myserver | grep -E '^(hostname|user|port|identityfile) '.

What is the difference between ProxyJump and ForwardAgent?

ProxyJump uses the bastion only as a tunnel; authentication to the target happens from your machine. ForwardAgent lends your agent to the server, so its administrator can use your keys elsewhere while you are connected. To hop through a bastion, use ProxyJump.

Is what I type sent to a server?

No. The block is built in your browser. Addresses, user names and paths are not sent to a server and are not passed to the analytics or ads this site uses. See the privacy notice.