1. Help Center
  2. Virtual Machines
  3. Access and secure shell (SSH)

Can I use a password to connect to my VMs instead of SSH keys?

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:

 

For further assistance, don't hesitate to reach out to us at:

Support Email: [email protected]

Sales Contact: [email protected]

Phone: +44 (0) 203 475 3402


nexgen logo

Please check out our Website and Social Media