Dmitry Teselkin | e9420e7 | 2018-04-03 13:49:39 +0300 | [diff] [blame^] | 1 | # 5.2.5 Ensure SSH MaxAuthTries is set to 4 or less (Scored) |
| 2 | # |
| 3 | # Profile Applicability |
| 4 | # --------------------- |
| 5 | # - Level 1 - Server |
| 6 | # - Level 1 - Workstation |
| 7 | # |
| 8 | # Description |
| 9 | # ----------- |
| 10 | # The MaxAuthTries parameter specifies the maximum number of authentication attempts |
| 11 | # permitted per connection. When the login failure count reaches half the number, error |
| 12 | # messages will be written to the syslog file detailing the login failure. |
| 13 | # |
| 14 | # Rationale |
| 15 | # ---------- |
| 16 | # Setting the MaxAuthTries parameter to a low number will minimize the risk of successful |
| 17 | # brute force attacks to the SSH server. While the recommended setting is 4, set the number |
| 18 | # based on site policy. |
| 19 | # |
| 20 | # Audit |
| 21 | # ----- |
| 22 | # Run the following command and verify that output MaxAuthTries is 4 or less: |
| 23 | # |
| 24 | # # grep "^MaxAuthTries" /etc/ssh/sshd_config |
| 25 | # MaxAuthTries 4 |
| 26 | # |
| 27 | # Remediation |
| 28 | # ----------- |
| 29 | # Edit the /etc/ssh/sshd_config file to set the parameter as follows: |
| 30 | # |
| 31 | # MaxAuthTries 4 |
| 32 | |
| 33 | parameters: |
| 34 | openssh: |
| 35 | server: |
| 36 | max_auth_tries: 4 |
| 37 | |