1
votes

I have an already running linux instance. I right clicked on that instance and created an image (EBS AMI), I entered the details, and a few minutes later I had my AMI listed in the Images -> AMIs section of the ec2 console.

I right clicked on this API, and requested spot pricing instance, filled in the form and selected the correct security group. It created fine and status checks were green, 2/2.

However when I tried to connect to this new instance, I would just get an error

ssh_exchange_identification: read: Connection reset by peer

I checked I was specifying the path to my key file, I checked the security group and it was all fine. I deleted the SSH rule and re-applied it, still failed.

I logged out and logged into my other instance (which this new one was based off), no issues with that one. I deleted my new spot instance, and created another based off my AMI. Same issue.

I then created a new instanced based off Ubuntu instance, and was able to login fine.

So for some reason, I can't login to an instance which I have created based of an AMI I have created via the GUI console.

2

2 Answers

2
votes

I removed the old AMI and re-created it. This time however I un-mounted (an removed from fstab) another EBS drive which I didn't want used with the AMI.

Seems to work now.

0
votes

Creating a Custom AMI from the AWS Management Console

I had a situation where I could not ssh into my new instance which was launched from a custom AMI I created via the AWS Dashboard

I found that it is safer not to generate an AMI from a running instance even though the no Reboot is left unchecked. It is more reliable to stop the running instance manually and then create the image.

On the face of it, leaving no Reboot unchecked appears unreliable, as it is supposed to stop the running instance, take an image copy, and then restart the instance on your behalf, but there may perhaps be some problems with this process happening properly.