Ssh – Why can’t I SSH into a new EC2 instance I created from an AMI I generated

amazon ec2amazon-amiamazon-web-servicesssh

I followed the procedures for Creating an Amazon EBS-Backed Linux AMI with the exception that I did not shut down the original instance, just let AWS reboot it.

When I launch & start a new instance, I consistently cannot connect via SSH (or any method for that matter). I can connect to the original instance with no problems, even after reboots.

The new instances are in the same availability zone, in the same security group, and have the same key-pair as the original instance.

I don't think it matters, but the original instance was a m1.medium, and I'm trying to launch a m1.small.

Best Answer

I was able to fix this, and it was two things:

  1. I had removed the ec2-user key from /root/.ssh/authorized_keys which I think was preventing the AWS process from completing the initialization process.
  2. The NFS service seemed to be hanging on boot.

When I put the ec2-user info back in, and then set NFS to not start on boot, I was able to successfully launch and log in to a new instance.