Linux – Why can’t I ssh into the new EC2 Instance

amazon ec2amazon-web-serviceslinuxsshunix

I created a new instance (tiny, 64 bit AMI linux from Amazon)
Created a new key pair called "mir".
I downloaded mir.pem and put it in my ~/.ssh folder.
I even did ssh-add mir.pem.

Then I tried to ssh ubuntu@public_DNS_from_amazon

Why doesn't it work!?

Best Answer

Try ssh ubuntu@your.host.name -i your-private.key, instead of ssh-adding the key.

Oh, and make sure you allowed TCP port 22 through the Security Group.