Skip to content

Unable to connect

0

Hello, I'm unable to connect to my Instance suddenly.

  • By SSH
  • By EC2 Instance Connect
  • By browser

Firewall open port are

  • 22 set to my IP, AWS Region

I'm able to make a sceenshot.

Please note that if I attach the EC2 to a New Storage it works! *So I think Fail2Ban or UFW kick me out.

Is it possible to connect to a backdoor, AWS CLI or something else ?

Best,

asked 2 years ago172 views

2 Answers
2

Hello.

Why not try connecting with Systems Manager Session Manager instead of SSH?
I think you can use it by setting the IAM role required to use Session Manager and attaching it to EC2.
https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html

Please note that SSM Agent must be installed on EC2.
In most cases, it is installed if you created EC2 using the AMI provided by AWS.
https://docs.aws.amazon.com/systems-manager/latest/userguide/ami-preinstalled-agent.html

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

0

I cannot by SSM because I get:

SSM Agent is not online The SSM Agent was unable to connect to a Systems Manager endpoint to register itself with the service.

Change the type for Nitro maybe?

I'm unable to get a way to disable ufw or fail2ban... I'm ban.

With EC2 Instance Connect I get: Failed to connect to your instance EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance Connect. For more information, see EC2 Instance Connect Prerequisites at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html.

By SSH I get: connection timed out

By session manager I get: SSM Agent is not online The SSM Agent was unable to connect to a Systems Manager endpoint to register itself with the service ** By serial console I get:** This instance type is not supported for the EC2 serial console.

By Systems Manager I get @ step 1: assertInstanceIsManagedInstance -- aws:assertAwsResourceProperty == Failed

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.