Information
RHEL 9 SSHD must not allow blank passwords.
GROUP ID: V-257984
RULE ID: SV-257984r1045026
If an account has an empty password, anyone could log on and run commands with the privileges of that account. Accounts with empty passwords should never be used in operational environments.
Satisfies: SRG-OS-000106-GPOS-00053, SRG-OS-000480-GPOS-00229, SRG-OS-000480-GPOS-00227
Solution
To configure the system to prevent SSH users from logging on with blank passwords edit the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d":
PermitEmptyPasswords no
Restart the SSH daemon for the settings to take effect:
$ sudo systemctl restart sshd.service