0

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.

terdon
  • 100,812
  • @user68186 yep on physical hardware. The name of the iso i downloaded was ubuntu-23.10-live-server-amd64. I downloaded from the main ubuntu server download page. – coding4fun Feb 27 '24 at 17:10
  • What is the problem? You appear to have already discovered the solution in your question – Daniel T Feb 27 '24 at 17:27
  • From the accepted answer to Changing default values in /etc/ssh/sshd_config using cloud init config: "Since Ubuntu 20.04, the default /etc/ssh/sshd_config ships with a new Include /etc/ssh/sshd_config.d/*.conf directive precisely to solve your initial problem and to spare us of tricky (and error-prone) text manipulation using sed and friends, as creating a new file with just the wanted overrides is much, much easier." – user68186 Feb 27 '24 at 17:42
  • @DanielT there is no problem but that doesn't mean i don't want to understand it. – coding4fun Feb 27 '24 at 17:58

0 Answers0