I've added my public SSH key into AWS EC2 instance's authorized_keys
and I already double checked that the format and values are correct. The problem is I'm unable to login to terminal using following command without a .pem
file but I can login with the .pem
file. The issue is why I'm not able to login without a .pem
file.
Not working with this command:
sudo ssh ubuntu@publicIPAddress
Error:
Permission denied (publickey).
working with command:
sudo ssh -i mypemfile.pem ubuntu@publicIPAddress