Cloud-init How to enable password authentication after first boot

Recently I began using the native cloud-init customization for my CENTOS and RHEL servers in my VMware environment. What I found was that password logins are disabled by default. This is not a big deal for people using SSH keys (which is probably the better method anyway), but for an enterprise with several admins that could change groups or roles at any instant, Password authentication is still a viable and relevant way to authenticate. Keys are great, but it greatly reduces your flexibility.

So, in case you get in this situation, there are just a couple of tweaks you need to make to your cloud-init boot config.

Simply go to the following file with your favorite text editor on the linux template:
you want to change the value ssh_pwauth to true.
Change the value to ssh_pwauth: 1