sshconfig-lint / guide

Check SSH config syntax and behavior

All SSH config guides

Combine OpenSSH’s own parser with semantic linting instead of relying on a connection attempt.

Why a valid config can still be wrong

Syntax is only one layer. A directive can be valid but duplicated, shadowed by Host *, or dangerous when applied globally.

A reliable way to fix it

  1. Run ssh -G host to confirm OpenSSH can parse and expand the selected host.
  2. Run sshconfig-lint to find structural and security mistakes.
  3. Resolve every error first, then review warnings for intentional exceptions.
Problem
Host work
  User deploy
  User root
Corrected
Host work
  User deploy