RHEL 8, for certificate-based authentication, must enforce authorized access to the corresponding private key.

STIG ID: RHEL-08-010100  |  SRG: SRG-OS-000067-GPOS-00035 |  Severity: medium |  CCI: CCI-000186 |  Vulnerability Id: V-230230 | 

Vulnerability Discussion

If an unauthorized user obtains access to a private key without a passcode, that user would have unauthorized access to any system where the associated public key has been installed.

Check

Verify the SSH private key files have a passcode.

For each private key stored on the system, use the following command:

$ sudo ssh-keygen -y -f /path/to/file

If the contents of the key are displayed, this is a finding.

Fix

Create a new private and public key pair that utilizes a passcode with the following command:

$ sudo ssh-keygen -n [passphrase]