4.2.6 Ensure SSH PAM is enabled

Information

The UsePAM directive enables the Pluggable Authentication Module (PAM) interface. If set to yes this will enable PAM authentication using ChallengeResponseAuthentication and PasswordAuthentication directives in addition to PAM account and session module processing for all authentication types.

When usePAM is set to yes PAM runs through account and session types properly. This is important if you want to restrict access to services based off of IP, time or other factors of the account. Additionally, you can make sure users inherit certain environment variables on login or disallow access to the server

Solution

Edit the /etc/ssh/sshd_config file to set the parameter as follows:

UsePAM yes

See Also

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

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5(1), CSCv7|4.4

Plugin: Unix

Control ID: b9d38467cfa5a5f3ddf75c6fa3d4729101b673737ecaa771d029fbbc4d118e1e