Launch AWS AMI With Preconfigured Password

AWS will disable the preconfigured password that was previously configured when launching an instance from AMI. To keep the password active so that it can be login using username & password immediately upon launching it from image, lock_passwd needs to be set to false.

lock_passwd: False

Let’s start from the beginning. Login EC2 with key.

Enable SSH login by password by editing the ssh config file

sudo vim /etc/ssh/sshd_config