A worked example
An SFTP-only group is chrooted; root logs in with keys; passwords are off. Then someone appends two lines at the bottom:
PermitRootLogin prohibit-password
UsePAM yes
PasswordAuthentication no
Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory /srv/sftp/%u
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
PermitRootLogin no
What node check.mjs sshd_config prints for it:
sshd_config Check: 3 findings: 3 medium.
Read, in order: sshd_config
[medium] kbd-interactive-pam sshd_config:2
KbdInteractiveAuthentication is on by default and UsePAM is yes, so PAM asks for the Unix password through keyboard-interactive login, even though PasswordAuthentication is no.
fix: Set KbdInteractiveAuthentication no unless PAM drives a second factor (TOTP, Duo); then require keys first with AuthenticationMethods publickey,keyboard-interactive.
[medium] looks-global-but-in-match sshd_config:11 (Match Group sftponly)
X11Forwarding no is written flush left like a global setting, but sshd ignores indentation: it belongs to Match Group sftponly (sshd_config:6) and applies only to those connections.
fix: Move the line above the first Match block, or put Match all on the line before it.
[medium] looks-global-but-in-match sshd_config:12 (Match Group sftponly)
PermitRootLogin no is written flush left like a global setting, but sshd ignores indentation: it belongs to Match Group sftponly (sshd_config:6) and applies only to those connections.
fix: Move the line above the first Match block, or put Match all on the line before it.
Login: root prohibit-password (sshd_config:1); passwords ON via keyboard-interactive (PAM); keys on
Match Group sftponly (sshd_config:6): ChrootDirectory /srv/sftp/%u; ForceCommand internal-sftp; AllowTcpForwarding no; X11Forwarding no; PermitRootLogin no
Both appended lines belong to the Match Group sftponly block, and the passwords are not off: PAM still asks for them through keyboard-interactive login. Adding KbdInteractiveAuthentication no near the top and moving the two lines above the Match clears all three.
Lines that stop sshd starting
Types: sshd-will-not-start, global-only-in-match
sshd reads its whole configuration before it accepts a connection, and a line it cannot use is fatal: an unknown keyword (Bad configuration option, often a typo such as PasswordAuthenticaton, or a keyword your older OpenSSH does not have), a value outside the keyword's list (PermitRootLogin maybe), a keyword with nothing after it, unbalanced quotes, or a bad Match line. sshd-will-not-start covers these. global-only-in-match is the same failure for a keyword that may not appear inside a Match block at all: Port, ListenAddress, HostKey, Ciphers, MACs, KexAlgorithms, UsePAM, PermitUserEnvironment, StrictModes and others (the manual lists the ones that are allowed). Restart sshd with such a line when it is your only way in and you are locked out, which is why every fix here says to run sshd -t first and keep a session open.
Ignored lines: the first value wins
Types: setting-ignored
The manual says it plainly: for each keyword, the first obtained value is used. Most config files work the other way, so people append a fix to the end of sshd_config and it does nothing. The common way this bites on Ubuntu and Debian: the stock file starts with Include /etc/ssh/sshd_config.d/*.conf, so every drop-in is read before the main file's own lines. A PasswordAuthentication yes in 50-cloud-init.conf (cloud-init writes one when an image asks for password logins) beats PasswordAuthentication no anywhere below the Include. Drop-ins are read in byte order of their names, so 00-hardening.conf beats 50-cloud-init.conf, which beats 99-local.conf. The checker reports the line that is ignored and the line that won; repeats with the same value are not reported. List keywords such as Port, ListenAddress, HostKey, AcceptEnv and AllowUsers add up across lines and are never ignored; Subsystem keeps the first definition of each name.
Drop-ins sshd never reads
Types: dropin-not-read
An Include line is a glob. The stock one matches *.conf, so a file called hardening, hardening.cfg or hardening.conf.bak in sshd_config.d is never read, and every setting in it does nothing. The checker reports any drop-in you pasted that no Include reaches, medium when it holds a security setting. Relative Include paths resolve against /etc/ssh, not against the file that contains them.
Match blocks do not end where the indentation does
Types: looks-global-but-in-match
A Match line starts a block that runs until the next Match line or the end of the file. Indentation means nothing to sshd. So a setting written flush left after an indented block, usually added later at the bottom of the file, belongs to that block and applies only to the users, groups or addresses it selects. In the worked example above, PermitRootLogin no at the bottom only affects the sftponly group, and root keeps prohibit-password. The checker flags a flush-left line inside a block whose body is indented. That is a heuristic: it cannot know intent, only that the layout and the meaning disagree. The fix is to move global lines above the first Match, or to write Match all, which returns to global settings. An Include inside a Match puts the included file's lines in that block; a Match inside an included file ends at that file's end.
Password logins
Types: password-auth-on, kbd-interactive-pam
PasswordAuthentication defaults to yes. If no line sets it, every account with a password can be guessed at from the network. password-auth-on reports the winning line or the default. kbd-interactive-pam is the second door: with UsePAM yes, which Ubuntu's and Debian's stock files set, keyboard-interactive login hands the conversation to PAM, and PAM's usual stack asks for the Unix password. KbdInteractiveAuthentication (formerly ChallengeResponseAuthentication, still accepted) defaults to yes in OpenSSH; Ubuntu's stock file sets it to no, but a file carried over from elsewhere may not. Turn both off once every user has a key, unless PAM is there for a second factor, in which case require the key too with AuthenticationMethods publickey,keyboard-interactive. A Match block that turns passwords back on (for an office range, say) is reported in that block's scope.
Root login
Types: permit-root-login-yes
The OpenSSH default is prohibit-password: root may log in with a key, never with a password. PermitRootLogin yes reopens the password route for the one account name every scanner tries. It is high when passwords are on in any form, and low when they are off (it then acts like prohibit-password, until something turns passwords back on). no is stricter still; log in as a user and use sudo.
Empty passwords and user environment
Types: permit-empty-passwords, permit-user-environment
PermitEmptyPasswords yes lets an account whose password is empty log in with nothing. PermitUserEnvironment yes reads ~/.ssh/environment and environment= options in authorized_keys, so a user can set LD_PRELOAD for the processes sshd starts for them, which defeats ForceCommand and restricted keys; the manual warns about this. Only lowercase yes and no are keywords for this option (OpenSSH compares them case-sensitively here, unlike the yes/no options): Yes is read as a pattern list of variable names. A short list of harmless names such as LANG,LC_* is reported as low.
Old algorithms
Types: weak-algorithm
OpenSSH's default algorithm lists are strong, and the usual way weak ones come back is a line added for one old client: Ciphers +aes128-cbc, HostKeyAlgorithms +ssh-rsa. The checker reads explicit lists and + or ^ additions (a - removal only removes) for Ciphers, MACs, KexAlgorithms, HostKeyAlgorithms, PubkeyAcceptedAlgorithms and CASignatureAlgorithms. High: RC4 (arcfour). Medium: CBC-mode ciphers, MD5 MACs, the 1024-bit diffie-hellman-group1-sha1, DSA (ssh-dss). Low: SHA-1 MACs and key exchange, 64-bit-tag UMAC, and ssh-rsa (RSA keys keep working through rsa-sha2-256 and rsa-sha2-512). The OpenSSH release notes record when each left the defaults.
Settings that trust more than they look
Types: strict-modes-off, rhosts-honoured, hostbased-auth-on
StrictModes no lets sshd use an authorized_keys file or home directory that other users can write, so any local user who can write there can add their own key. IgnoreRhosts no makes host-based login honour ~/.rhosts and ~/.shosts, files the user controls. hostbased-auth-on (HostbasedAuthentication yes) trusts whole client machines: root on any trusted host can log in here as anyone.
Forwarding and tunnels
Types: x11-forwarding-on, gateway-ports-on, tunnel-devices-on
X11Forwarding yes is on in Ubuntu's stock file; it lets graphical programs run over SSH, and a client that connects with ssh -Y lets root on the server read its screen and keystrokes. GatewayPorts yes or clientspecified lets ssh -R publish a port on the server's public address. PermitTunnel lets users create tun/tap devices, a full VPN. All three are low: often deliberate, worth knowing about.
Limits
Types: max-auth-tries-high, login-grace-unlimited
MaxAuthTries over 10 gives each connection more guesses (the default is 6). LoginGraceTime 0 removes the time limit for unauthenticated connections, so a few idle ones can fill MaxStartups and keep real users out.
Options that do nothing
Types: ignored-option
Options OpenSSH has removed, such as UsePrivilegeSeparation, RSAAuthentication, RhostsRSAAuthentication and UseLogin, are accepted and ignored with a log line. If a file relies on one, whatever it was meant to do is not happening.
What the checker cannot see
It reads files, not a server. It assumes OpenSSH 9.6's compiled-in defaults (a distribution can patch them, and older releases differ), and it does not see authorized_keys, the PAM stack, firewall rules, fail2ban or which accounts have passwords. Match blocks are shown one at a time on top of the global settings; to see what one login gets with several blocks applying, fill in the connection fields on the tool page, or run sudo sshd -T -C user=deploy,addr=203.0.113.9,host=client on the server.