I just installed Ubuntu server 23.10 yesterday. I downloaded the iso directly from ubuntu.com. Everything went fine during the install. For security reasons, I always disable password authentication, so in /etc/ssh/sshd_config I set PasswordAuthentication to no. It wasn't working.
Well, I finally figured out why today. Apparently, during the installation, the file /etc/ssh/sshd_config/50-cloud-init.conf was created and, in that file, there was a single line:
PasswordAuthentication yes
I've never had this issue before, but this is the first time I've used 23.10. The only difference during this installation is that I used the "minimal install". I don't know if that made a difference.
What is that file and why was it created? Is this a recent change? Apparently it was overwriting what was in sshd_config. I'm not sure if the way I fixed it was correct (but it worked). I just changed that value in that file to be no too.