Skip to content

5.2.6 Ensure SSH PAM is enabled

Audit#

Run the following command:

# sshd -T -C user=root -C host="$(hostname)" -C addr="$(grep $(hostname) /etc/hosts | awk '{print $1}')" | grep -i usepam

Verify the output matches:

usepam yes

Run the following command:

# grep -Ei '^\s*UsePAM\s+no' /etc/ssh/sshd_config

Nothing should be returned.

Remediation#

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

UsePAM yes