Locked Out Of SSH On EC2

AWS Tutorial Series · 15K views · 2014 · 6:00

Open on YouTube

Cloud, DevOps & reliabilityLinux & open-source ecosystemsTesting, debugging & developer toolstutorial

Why Server Fault recommends it

Server Fault users link it when they are locked out of SSH on an EC2 instance and need a worked example of the rescue-volume approach.

Recommended by 0 people across 0 different months, 2015 to 2018.

What it is

A short 2014 screencast from AWS Tutorial Series showing how to recover SSH access to an EC2 instance you have locked yourself out of. It walks through the usual fix of detaching the broken instance's volume, attaching it to a working instance, and repairing the configuration.

What people said

Cites brianlmerritt · 2015-12 · Server Fault · on “Unable to SSH into EC2 Ubuntu Instance port 22:Connection Refused”

Cool - it will cost only cents to create another instance and troubleshoot by ssh between them and also did you try everything on [this video] ?

Cites He Hui · 2016-08 · Server Fault · on “Unable to SSH into ec2 after reboot”

I hoping that this is the right place to post this. Today I was locked out of my ec2 after a reboot. This is what it says when I try to ssh: OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 22. debug1: connect to address xx.xx.xx.xx port 22: Connection refused ssh: connect to host xx.xx.xx.xx port 22: Connection refused I've went through the following questions: [LINK] Amazon EC2 - No SSH After Reboot, Connection Refused [LINK] [this video] I have already tried detaching my volume in attempt to fix sshd_config but that

Cites Hüseyin KÜÇÜK · 2018-09 · Server Fault · on “ec2 ssh Permission denied (publickey)”

Two days ago, I tried to connect to the server with ssh as usual. But I got a connection refused error. I've tried a lot of solutions. As in this youtube video ( [this video] ), I tried to solve the problem by attaching the problem server to a running server. [LINK] I applied the solution here. chown root: root/var/empty/sshd chmod 711 /var/empty/sshd Then I did a detach of the problematic server's volume and did it again to the problematic server. The server was running smoothly when I started the server, but I couldn't connect with ssh again. Then, as described here ( [LINK] ), I did the problematic server's volume attaching to a seamless server. Then I smoothly installed the server's authorize