Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

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

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

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

    Code Block
    languagebash
    sudo /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.

    Code Block
    languagebash
    sudo sed -i 's/lock_passwd: True/lock_passwd: False/' /etc/cloud/cloud.cfg

...