UBTU-24-300031 - Ubuntu 24.04 LTS must not allow unattended or automatic login via SSH.

Information

Failure to restrict system access to authenticated users negatively impacts Ubuntu 24.04 LTS security.

Solution

Configure Ubuntu 24.04 LTS to allow the SSH daemon to not allow unattended or automatic login to the system.

Add or edit the following lines in the "/etc/ssh/sshd_config" file:

PermitEmptyPasswords no
PermitUserEnvironment no

Restart the SSH daemon for the changes to take effect:

$ sudo systemctl restart sshd.service

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_CAN_Ubuntu_24-04_LTS_V1R5_STIG.zip