sshconfig-lint / guide
Put Host * in the correct order
← All SSH config guidesPrevent broad SSH defaults from winning before a specific Host block is evaluated.
Why a valid config can still be wrong
For most settings, OpenSSH keeps the first obtained value. Host * near the top can therefore override a specific block below it.
A reliable way to fix it
- Move specific Host and Match blocks above the wildcard.
- Keep shared defaults in Host * at the end.
- Use ssh -G alias to confirm the effective User, HostName, and IdentityFile.
Host *
User deploy
Host github.com
User gitHost github.com
User git
Host *
User deploy