5.7 (L2) Ensure the SSH authorized_keys file is empty

Information

ESXi hosts come with Secure Shell (SSH), which can be configured to authenticate remote users using public key authentication. For day-to-day operations, the ESXi host should be in lockdown mode with the SSH service disabled. Lockdown mode does not prevent root users from logging in using keys. The presence of a remote user's public key in the /etc/ssh/keys-root/authorized_keys file on an ESXi host identifies the user as trusted, meaning the user is granted access to the host without providing a password.

Disabling authorized_keys access may limit your ability to run unattended remote scripts.

Keeping the authorized_keys file empty prevents users from circumventing the intended restrictions of lockdown mode.

Solution

To remove all keys from the authorized_keys file, perform the following:

- Logon to the ESXi shell as root or another admin user.

- SSH may need to be enabled first

- Edit the /etc/ssh/keys-root/authorized_keys file.
- Remove all keys from the file and save the file.

See Also

https://workbench.cisecurity.org/benchmarks/25143

Item Details

Category: ACCESS CONTROL, AUDIT AND ACCOUNTABILITY

References: 800-53|AC-2, 800-53|AC-3, 800-53|AC-6, 800-53|AC-6(1), 800-53|AC-6(7), 800-53|AU-9(4), CSCv7|9.2

Plugin: Unix

Control ID: 4696408ad1f2e61f1df007e00913d43f4f5506f2ee7278f523a33ddf468f3287