Instructions


  1. Reset the password for Ubuntu to a strong password.

    1sudo passwd ubuntu
  2. Modify the ssh config file on the instance to allow password authentication.

    1sudo nano /etc/ssh/sshd_config
  3. Change the ‘PasswordAuthentication’ directive from no to yes.

    1sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
  4. Restart the sshd service to make the changes effective.

    1sudo /etc/init.d/ssh restart
  5. Modify the cloud-init configuration so as to not lock user accounts upon instance creation from a custom AMI.

    1sudo sed -i 's/lock_passwd: True/lock_passwd: False/' /etc/cloud/cloud.cfg

 


Related articles


Filter by label (Content by label)

Related issues


Page Properties