Enable Password Login Instead Of A Key Pair From Amazon Linux
- Create and login to Amazon Linux EC2 instance using .pem
- Set a password for user. The example below uses ec2-user as the user:
$ sudo passwd ec2-user Changing password for user ec2-user. New password: Retype new password:
- Update the PasswordAuthentication parameter in the /etc/ssh/sshd_config file:
#open the sshd_config file in VIM editor vim /etc/ssh/sshd_config #change below parameter to yes PasswordAuthentication yes
- Restart the SSH service.
sudo service sshd restart