
SSH Config Generator
Generate ~/.ssh/config Host blocks with HostName, User, Port, IdentityFile, ProxyJump bastion host, LocalForward port forwarding, and ServerAliveInterval.
Open toolAudit OpenSSH `~/.ssh/config` files locally in your browser: verify directive syntax, catch **first-match-wins (`Host *`) shadowing bugs**, check `ProxyJump` references, and flag `ForwardAgent` / `StrictHostKeyChecking` security hazards.
Enter the inputs, then select Validate SSH Config.
Result will appear here
The single most common `~/.ssh/config` bug is treating `Host *` at the top of the file as "default values to be overridden later."
EffectiveValue(HostAlias, DirectiveKey) = FirstMatchingHostBlock(TopToBottom).get(DirectiveKey)
Because OpenSSH stops updating a directive as soon as it sees the first matching Host block that defines that directive, specific Host blocks must come first and 'Host *' must come last.
Key syntactic, ordering, and security checks performed by the validator on your `~/.ssh/config` file.
| Check Category | Misconfiguration Pattern | Actual OpenSSH Runtime Effect | Validator Verdict & Fix |
|---|---|---|---|
| **First-Match-Wins Ordering** | `Host *` placed **above** `Host prod-db` | Global defaults in `Host *` silently shadow `User` / `Port` in later blocks | **WARN (`Shadowed Host`)** — Move `Host *` to the bottom of the file |
| **Agent Forwarding Exposure** | `ForwardAgent yes` on wildcard or bastion host | Remote root user can hijack your local `ssh-agent` socket | **WARN (`Security Risk`)** — Replace with `ProxyJump bastion` |
| **MITM Host Verification** | `StrictHostKeyChecking no` | Accepts forged or changed host keys without warning | **WARN (`Security Risk`)** — Use `accept-new` or `yes` |
| **Default 3-Block Sample** | `bastion` (`:2222`), `prod-db` (`ProxyJump bastion`), `Host *` last | Clean first-match order, valid ports, `IdentitiesOnly yes` | **`VALID (3 Host blocks, 0 errors, 0 warnings)`** |
Audit your SSH client configuration in three steps.
Paste the contents of `~/.ssh/config` or `/etc/ssh/ssh_config` into the editor.
Keep 'Strict Security & Precedence Audit' enabled to catch both syntax errors and wildcard shadowing / security warnings.
Click Validate SSH Config to see all parsed Host blocks, line-level errors/warnings, and ProxyJump chain checks.
Compare a properly ordered bastion + jump-host config against common pitfalls.
The default 3-block config defines 'Host bastion' (Port 2222), 'Host prod-db' (ProxyJump bastion), and 'Host *' at the very bottom—passing with 3 Host blocks, 12 directives, 0 errors, and 0 warnings.
If 'Host *' is placed at line 1 above 'Host bastion', Strict Mode flags a precedence warning explaining that directives inside 'Host *' will override later specific blocks.
Entering 'Port 70000' or a misspelled directive like 'HostNmae' immediately fails validation with the exact line number.
The validator separates hard syntax errors from precedence and security warnings.
The primary result badge displays `VALID` or `INVALID` along with the count of Host/Match blocks, total directives, errors, and warnings.
The detailed audit lists every parsed Host block (`HostName`, `User`, `Port`, `ProxyJump`) followed by line-referenced diagnostics.
Understand what static config validation checks vs. live network probing.
This tool performs static syntactic, precedence, and security analysis 100% inside your browser; it does not open TCP sockets or test live SSH reachability.
To verify how your local OpenSSH binary resolves a specific alias on disk, you can also run `ssh -G <host-alias>` in your terminal.

Generate ~/.ssh/config Host blocks with HostName, User, Port, IdentityFile, ProxyJump bastion host, LocalForward port forwarding, and ServerAliveInterval.
Open tool
Check SSH and PEM public key bit size, algorithm (RSA, Ed25519, ECDSA P-256/P-384/P-521), modulus length, and NIST SP 800-57 security level in your browser.
Open tool
Validate systemd .service and .timer unit files online: check section headers, ExecStart absolute paths, Type/BusName rules, and sandboxing directives.
Open toolChoose another tool for your next calculation, conversion, or text task.
Find network, mask, broadcast, and usable address range.
Open toolConvert self-contained SVG markup into a CSS background data URI.
Open toolValidate YAML 1.2 syntax, duplicate keys, and bounded alias references.
Open tool
HTML markup diagnostics with line and column locations. Run bundled html-validate rules against the supplied HTML source without executing it.
Open toolAnswers about using SSH Config Validator (Syntax, First-Match Precedence & Security Audit) and understanding its results.
Contrary to CSS or many config formats where later declarations override earlier ones, OpenSSH's ssh_config(5) uses a strict FIRST-MATCH-WINS rule: for each parameter, the first obtained value is used. If you put 'Host *' with 'User ubuntu' at the top of ~/.ssh/config, every subsequent 'Host prod-db' block's 'User postgres' line will be silently ignored!
Enabling 'ForwardAgent yes' exposes a UNIX domain socket on the remote server that connects back to your local ssh-agent. Anyone with root access (or your UID) on that remote server can use your local SSH keys to authenticate to any other server you can access while your session is open. Always prefer 'ProxyJump' over 'ForwardAgent'.
By default, ssh-agent offers every loaded key in memory before trying the specific 'IdentityFile' configured for a host. If you have 5+ keys loaded in ssh-agent, the remote sshd hits 'MaxAuthTries' (default 6) and disconnects with 'Too many authentication failures'. Setting 'IdentitiesOnly yes' restricts SSH to only the IdentityFile(s) explicitly declared for that host.
Setting 'StrictHostKeyChecking no' disables man-in-the-middle (MITM) host key verification even when a known server's host key changes unexpectedly. OpenSSH 7.6+ introduced 'StrictHostKeyChecking accept-new', which automatically trusts brand-new hosts on first connection while still blocking connections if an existing host's key changes.
Choose another tool for your next calculation, conversion, or text task.