Skip to content

5.1.18 Ensure sshd MaxStartups is configured

Audit#

Run the following command to verify MaxStartups is 10:30:60 or more restrictive:

# sshd -T | awk '$1 ~ /^\s*maxstartups/{split($2, a, ":");{if(a[1] > 10 || a[2] > 30 || a[3] > 60) print $0}}'
Nothing should be returned.

Remediation#

Edit the /etc/ssh/sshd_config file to set the MaxStartups parameter to 10:30:60 or more restrictive above any Include entries as follows:

MaxStartups 10:30:60
Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

Default Value: MaxStartups 10:30:100