6.1.4 Set SSH MaxAuth Tries to 3 - Check if MaxAuthTries is set to 3 or lower and not commented for the server.

Information

The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. The default value is 6.

Note - If you will be editing all the SSH parameters, use the script in section 6.1 Configure SSH.

Solution

Edit the /etc/ssh/sshd_config file to set the parameter as follows-
awk '/^ MaxAuthTries/ { $2 = '3' } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new
/usr/bin/mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config
/usr/sbin/pkgchk -f -n -p /etc/ssh/sshd_config
/usr/sbin/svcadm restart svc:/network/ssh

See Also

https://workbench.cisecurity.org/files/614

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-7a., CSCv6|16.7

Plugin: Unix

Control ID: 378c403be5a7f1f20ee39b4d65bc60c19a3cc0aa9e6be211fe9a87e1cd5d22d4