Ssh – Amazon ec2 Ubuntu no ssh after update and reboot

amazon ec2sshubuntu-14.04

I have Ubuntu 14.04 server (LAMP), running on Amazon ec2. On my client machine I run Putty with imported SSH key. Session is saved, so there is no changes always. I had no errors during connection and everything was fine. But today I've made apt-get update and reboot. Now I see
Using username "ubuntu".
Server refused our key

error and promt to enter password. I've already tried to Stop and Start instace, but that doesn't help.

Best Answer

If nothing else works, what you could do is to create an AMI image from your current instance, and then launch a new instance from that AMI. When you launch the new instance, you will have the option to create a new private key or use an existing one. If you can connect to the new instance, just terminate the old one and reassign the Elastic IP to the new one.

Edit: If you still can't connect to the new instance, you could fire a new instance (using a vanilla Ubuntu AMI, not your own) and then mount the EBS volume of your broken instance into the new instance. This would allow you to have access to the filesystem of the broken instance and maybe find a way to fix it, or at least, copy files from it. The detailed steps are described in this post.

Related Topic