← All rules
SOCLE-CLD-SSH-028// SSHmediumeffective runtime

Ensure SSH MaxStartups is configured

Rate-limit concurrent unauthenticated SSH connections with MaxStartups set to 10:30:60.

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 2 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

MaxStartups rate-limits concurrent unauthenticated connections to sshd, the half-open sockets between TCP connect and successful login. The 10:30:60 form means: accept up to 10 pending connections, then start randomly dropping new ones at a 30% probability, and refuse all once 60 are pending. This blunts connection-flood denial-of-service at the login stage and limits how many brute-force slots an attacker can hold, preserving the availability of legitimate logins.

What Pavois checks

Pavois asserts that the effective sshd -T output reports maxstartups 10:30:60. Reading the live daemon reflects the value after all Include directives and /etc/ssh/sshd_config.d/ drop-ins are merged, a file scan can miss an override and report a false result.

describe command('sshd -T') do
  its('stdout') { should match(/^maxstartups\s+10:30:60$/i) }
end

How to verify it is applied

Run sshd -T | grep -i maxstartups. Expected output:

  • maxstartups 10:30:60

Inspect & investigate

Dropped pending connections are logged in /var/log/auth.log (Debian/Ubuntu) or journalctl -u ssh / journalctl -u sshd (RHEL family) as drop connection #N from ... once the threshold is reached.

Remediation

Pavois's harden plan sets the sshd_setting resource for directive maxstartups to 10:30:60, validates the candidate config with sshd -t, then notifies a reload of the ssh service. Apply it with pavois harden apply.

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

directivemaxstartups
notifyaction: reload, service: ssh.service
resourcesshd_setting
value10:30:60
verifysshd -t -f %{path}
pavois harden plan local

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

Impact & precautions

On busy bastions or CI hosts that legitimately open many simultaneous SSH connections, an over-tight threshold can cause sporadic Connection refused/drop connection errors during bursts. Size the values to your real peak concurrency (raise the start/full thresholds if needed), stagger automated jobs, keep a second session open, and rely on the built-in sshd -t validation so a typo never breaks the listener.

Standards mapping

StandardReferenceTypeVersionConfidence
CIS2.2.6, 5.1.18, 5.1.17, 5.1.20directper OS, see the benchmark tablehigh
PCI DSS2.2.6supporting4.0.1medium

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