ubuntusshfirewallamazon-lightsail

I can't connect to my Lightsail instance via SSH - port 22 closed and no access to web console


I have an instance on AWS Lightsail, and I am unable to connect via SSH. I have checked the firewall rules in the Networking tab and port 22 is open, but when I try to connect, I get an error that the port is closed.

I think I made a mistake and by adjusting a setting I have closed it directly in the OS.

I have tried the following:

  1. I checked the security rules in Lightsail and I confirm that port 22 is open for my IP.
  2. I restarted the instance from the Lightsail console.
  3. I tried accessing the instance using AWS CloudShell, but I am unable to connect directly via SSH from there.
  4. I do not have access to the Lightsail web console as I cannot see any serial console options either.

Does anyone have suggestions on how to fix this issue or how I can access my Lightsail instance alternatively?


Solution

  • If you blocked port 22 at the OS level, I really don't think there's anything you can do.

    There MIGHT be a way to recover your data using a snapshot, but I've never done that and really don't know how. I've seen references in documentation about restoring from a snapshot though.