Enable password authentication for Amazon Linux EC2 Instance

Vignesh A Sathiyanantham
1 min readAug 31, 2019

The default user for Amazon Linux 2 is ec2-user, first, we need to create a password for the ec2-user

[ec2-user@ip-164 ]$ sudo passwd ec2-user
Changing password for user ec2-user.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Then enable the password authentication for the Login in the SSHD config file

sudo nano /etc/ssh/sshd_config

Find the PasswordAuthentication no
and set it to yes

Restart the SSHD Service

sudo systemctl restart sshd

Originally published at asvignesh.

--

--

Vignesh A Sathiyanantham

Decade of experience in building product related to private datacenter and public cloud #Java #AWS #VMware #Python