Skip to content

5.2.9 Ensure SSH PermitEmptyPasswords is disabled

Audit#

Run the following command:

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

Verify the output matches:

permitemptypasswords no

Run the following command and verify the output:

# grep -Ei '^\s*PermitEmptyPasswords\s+yes' /etc/ssh/sshd_config

Nothing should be returned.

Remediation#

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

PermitEmptyPasswords no

Default Value:

PermitEmptyPasswords no