Dmitry Teselkin | e9420e7 | 2018-04-03 13:49:39 +0300 | [diff] [blame] | 1 | # 5.2.8 Ensure SSH root login is disabled (Scored) |
| 2 | # Profile Applicability |
| 3 | # --------------------- |
| 4 | # - Level 1 - Server |
| 5 | # - Level 1 - Workstation |
| 6 | # |
| 7 | # Description |
| 8 | # ----------- |
| 9 | # The PermitRootLogin parameter specifies if the root user can log in using ssh(1). The |
| 10 | # default is no. |
| 11 | # |
| 12 | # Rationale |
| 13 | # --------- |
| 14 | # Disallowing root logins over SSH requires system admins to authenticate using their own |
| 15 | # individual account, then escalating to root via sudo or su . This in turn limits opportunity |
| 16 | # for non-repudiation and provides a clear audit trail in the event of a security incident |
| 17 | # |
| 18 | # Audit |
| 19 | # ----- |
| 20 | # Run the following command and verify that output matches: |
| 21 | # |
| 22 | # # grep "^PermitRootLogin" /etc/ssh/sshd_config |
| 23 | # PermitRootLogin no |
| 24 | # |
| 25 | # Remediation |
| 26 | # ----------- |
| 27 | # Edit the /etc/ssh/sshd_config file to set the parameter as follows: |
| 28 | # |
| 29 | # PermitRootLogin no |
| 30 | |
| 31 | parameters: |
| 32 | openssh: |
| 33 | server: |
| 34 | permit_root_login: False |
| 35 | |