Why can I still log in with a password after disabling SSH password authentication?

0
0
Asked By MellowPine47 On

I configured Ubuntu 24.04's sshd_config with PasswordAuthentication no, PermitRootLogin no, and PubkeyAuthentication yes. I restarted the SSH service with sudo systemctl restart ssh, but I can still connect to the VirtualBox VM using a password. The same behavior occurs with a Hyper-V VM, so it doesn't appear to be specific to VirtualBox. Has something changed in newer Ubuntu releases, or is another SSH setting overriding my configuration?

1 Answer

Answered By QuietMarble6 On

The setting you changed only disables the password authentication method itself; it doesn’t necessarily disable every authentication method that can prompt for a password. Check the complete effective sshd configuration rather than relying only on sshd_config, especially the files under /etc/ssh/sshd_config.d/. Also make sure you’re testing a normal user account and not accidentally connecting through another service or configuration.

MellowPine47 -

The SSH service was already restarted, so I’ll focus on checking the effective configuration and the additional files included by the newer Ubuntu setup.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.