50-cloud-init.conf keeps getting recreated and disable SSH password authentication

Solution Verified - Updated -

Issue

The file /etc/ssh/sshd_config.d/50-cloud-init.conf keeps getting recreated and disable SSH password authentication.

Content of the file:

# cat /etc/ssh/sshd_config.d/50-cloud-init.conf
PasswordAuthentication no

Environment

  • Red Hat Enterprise Linux 9.2
  • openssh-8.7p1-34.el9
  • cloud-init-23.1.1-11.el9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content