UBTU-22-255025 - Ubuntu 22.04 LTS must not allow unattended or automatic login via SSH.

Information

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

Solution

Configure the SSH server to not allow unattended or automatic login to the system.

Add or modify 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_22-04_LTS_V2R8_STIG.zip