sshconfig-lint / guide

How to validate ~/.ssh/config

All SSH config guides

Check an OpenSSH client config for semantic mistakes, local file problems, and Include errors before connecting.

Why a valid config can still be wrong

OpenSSH often accepts a file even when later settings are ineffective, unsafe, or point to missing files. A successful connection is not a complete validation.

A reliable way to fix it

  1. Paste the config into the private browser checker for a quick content check.
  2. Run sshconfig-lint ~/.ssh/config for Include and IdentityFile checks.
  3. Use ssh -G your-host to inspect the final values OpenSSH applies.
Problem
Host *
  User deploy

Host work
  User alice
Corrected
Host work
  User alice

Host *
  User deploy