When "UsePAM" is set to "yes", PAM runs through account and session types properly. This is important when restricted access to services based on IP, time, or other factors of the account is needed. Additionally, this ensures users can inherit certain environment variables on login or disallow access to the server.
Check
Verify RHEL 10 SSHD is configured to allow for the "UsePAM" interface with the following command:
If the "UsePAM" keyword is set to "no", is missing, or is commented out, this is a finding.
Fix
Configure RHEL 10 SSHD to use the "UsePAM" interface by adding or modifying the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d".
UsePAM yes
Restart the SSH daemon with the following command for the settings to take effect: