How can I use a password instead of an SSH key to access my virtual machines?
Connection to a VM using a password can be achieved using a cloud-init script, outlined below:
#cloud-config
ssh_pwauth: True
chpasswd:
list: |
root:&92H*eMFATUB^kmEEkp
expire: False
package_update: true
package_upgrade: true
runcmd:
sed -i -e '/^#PermitRootLogin/s/^.*$/PermitRootLogin yes/' -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart sshd
References: