← All rules
SOCLE-CLD-SSH-003// SSHcriticaleffective runtime

Disable SSH Access via Empty Passwords

Forces PermitEmptyPasswords no so accounts with a blank password can never log in over SSH.

Checked against the resolved running state (e.g. sshd -T, sysctl, systemctl show), catches drop-ins and Includes a file read would miss. Caveat: runtime ≠ persistence; a value correct now may not survive a reboot.

A pass proves✓ running now✓ on disk✓ survives rebootthe qualified verdict →
Debian 12CIS 1.1.0Debian 13CIS 1.0.0FedoraRHEL 10 / Rocky 10 / AlmaLinux 10RHEL 8 / Rocky 8 / AlmaLinux 8CIS 4.0.0RHEL 9 / Rocky 9 / AlmaLinux 9CIS 2.0.0Ubuntu 22.04CIS 3.0.0Ubuntu 24.04CIS 1.0.0Ubuntu 26.04
One check, maps to 4 standards

Pavois asserts the effective configuration, the live, resolved state, not a file. File-based scanners (OVAL/SCAP, Lynis) miss Includes, drop-ins and runtime defaults; this check sees what is actually applied.

A mapping is a cross-reference to where each standard places this requirement, anchored and cross-validated, not a claim of equivalence. A passing check is evidence toward these references, how to read it.

Why this rule matters

If an account ends up with an empty password (through misconfiguration, a provisioning bug, or a careless passwd -d), PermitEmptyPasswords yes lets a remote attacker log in with no credential at all, instant unauthenticated access, possibly to a privileged account. Setting it to no is a defence-in-depth backstop: even if an empty password slips into /etc/shadow, SSH still refuses the login.

What Pavois checks

Pavois reads the effective value from sshd -T, which reflects the main config plus every Include, drop-in in /etc/ssh/sshd_config.d/, and Match block. A file-based scan of /etc/ssh/sshd_config would miss a PermitEmptyPasswords yes re-enabled in a drop-in or inside a Match stanza.

describe command('sshd -T') do
  its('stdout') { should match(/^permitemptypasswords\s+no$/i) }
end

How to verify it is applied

Run sshd -T | grep -i '^permitemptypasswords'. Expected output is permitemptypasswords no.

Inspect & investigate

Authentication attempts (accepted/rejected) are logged in /var/log/auth.log (Debian/Ubuntu) or journalctl -u sshd (RHEL family). A refused empty-password login shows as a failed authentication line.

Remediation

Pavois's harden plan writes the sshd_setting directive PermitEmptyPasswords no in a managed drop-in, runs sshd -t to validate, then reloads the ssh service. Apply it with pavois harden apply.

Pavois applies this with its own harden engine, the plan below, not a shell script:

directivepermitemptypasswords
notifyaction: reload, service: ssh.service
resourcesshd_setting
valueno
verifysshd -t -f %{path}
pavois harden plan local

where the target is local, a user@host SSH alias, or a container , Docs

Impact & precautions

No impact on any properly-provisioned account, since legitimate users have real passwords or key-based auth. The only logins this blocks are those that should never have been possible. No lockout risk for normal users; the reload preserves active sessions.

Standards mapping

StandardReferenceTypeVersionConfidence
CIS2.2.6, 5.1.19, 5.1.21directper OS, see the benchmark tablehigh
NIST3.1.1, AC-17(a), CM-6(a), CM-7(a), CM-7(b)supporting800-53 Rev 5 · 800-171 Rev 2 (pinned)medium
PCI DSS2.2.6supporting4.0.1medium
DISA STIGUBTU-22-255025, UBTU-24-300031directper OS STIG releasehigh

Each reference is a cross-reference anchored in the upstream benchmark and cross-validated against the SCAP Security Guide and ansible-lockdown, not a claim of equivalence. Direct = a prescriptive, line-level requirement; supporting = an abstract control family (NIST) the check provides evidence toward. How to read a mapping.

Sources & references