Monday, February 13, 2023

Login using SSH into a new EC2 instance created from an custom AMI (image)

 Not able to login (SSH) to EC2 running Linux(Custom AMI)


Solution 

Login as ec2-user 

sudo su - root 


first use source *.pem key to login ec2 instance launch from custom AMI using ec2-user 

enable PasswordAuthentication to yes


vi /etc/ssh/sshd_config


PasswordAuthentication yes


systemctl restart sshd



then login with root user with same password as source. 

1 comment:

  1. OMG , this is simple issue but tok time to fix , thanks Anurag

    ReplyDelete