Enable password authentication for the Ubuntu Server in AWS

I created a Ubuntu 18.04 Instance in AWS, then I connected to the instance using the pem file using ssh -i pemfile ubuntu@public-IP

sudo passwd ubuntu
Changing password for user ubuntu.
New password:
Retype new password:

I set the password for the account, then enable the password authentication in the SSH config file

sudo nano /etc/ssh/sshd_config

Find the PasswordAuthentication no 
and set it to yes

PasswordAuthentication yes

sudo service ssh restart

Reference: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-password-login/


Also published on Medium.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading