Dmitry Teselkin | e9420e7 | 2018-04-03 13:49:39 +0300 | [diff] [blame] | 1 | # 5.2.13 Ensure SSH LoginGraceTime is set to one minute or less (Scored) |
| 2 | # |
| 3 | # Profile Applicability |
| 4 | # --------------------- |
| 5 | # - Level 1 - Server |
| 6 | # - Level 1 - Workstation |
| 7 | # |
| 8 | # Description |
| 9 | # ----------- |
| 10 | # The LoginGraceTime parameter specifies the time allowed for successful authentication to |
| 11 | # the SSH server. The longer the Grace period is the more open unauthenticated connections |
| 12 | # can exist. Like other session controls in this session the Grace Period should be limited to |
| 13 | # appropriate organizational limits to ensure the service is available for needed access. |
| 14 | # |
| 15 | # Rationale |
| 16 | # --------- |
| 17 | # Setting the LoginGraceTime parameter to a low number will minimize the risk of |
| 18 | # successful brute force attacks to the SSH server. It will also limit the number of concurrent |
| 19 | # unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set |
| 20 | # the number based on site policy. |
| 21 | # |
| 22 | # Audit |
| 23 | # ----- |
| 24 | # Run the following command and verify that output LoginGraceTime is 60 or less: |
| 25 | # |
| 26 | # # grep "^LoginGraceTime" /etc/ssh/sshd_config |
| 27 | # LoginGraceTime 60 |
| 28 | # |
| 29 | # Remediation |
| 30 | # ----------- |
| 31 | # Edit the /etc/ssh/sshd_config file to set the parameter as follows: |
| 32 | # |
| 33 | # LoginGraceTime 60 |
| 34 | |
| 35 | parameters: |
| 36 | openssh: |
| 37 | server: |
| 38 | login_grace_time: 60 |
| 39 | |