- Newest
- Most votes
- Most comments
Hello,
When doing a test to your instance I can see that it is timing out when trying to connect using netcat to Port 22. Looking at the console output I can see that uncomplicated firewall is starting on the instance. This can be enabled and lead to users not being able to SSH to their instances.
The below steps may resolve your issue. But as I am unable to determine it fully, I would think this is causing it. If you can confirm that the UFW service was enabled this may resolve it.
As always, before making any changes please ensure that you have created an AMI of your instance so that you have a backup of your data.
- Launched a recovery instance in the same AZ.
- Detached the root volume from the original instance and attached it to the recovery instance as /dev/sdf.
- Edit the firewall configuration by executing the following commands on recovery instance.
$ sudo lsblk
$ sudo mkdir /mnt/recovery
$ sudo mount /dev/xvdf1 /mnt/recovery
$ cd /mnt/recovery/etc/ufw
$ sudo vi ufw.conf
- changed ENABLED=yes to ENABLED=no
$ cd ~
$ umount /mnt/recovery - Detached the root volume and attached it back to the original instance as /dev/sda1.
- Start the original instance and you were able to access the instance after the boot.
That did it. Learned a lot from this, thank you very much. Despite me setting it as /dev/sda1 when reattaching, it looks like it ended up being /dev/nvme0n1p1. Is this normal? It seems to be functioning, regardless.
Relevant content
- asked 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago