Cannot SSH into EC2 instance after systemctl command

0

After executing some systemctl commands on our EC2 instance yesterday, the terminal froze and now we are unable to SSH back into the server. The API service we were hosting on this website is also down, and we'd like some assistance getting everything up and running again. I did try a few obvious things, name turning the system off and on again, as well as leaving it off overnight and restarting it in the morning. Still, no luck. Please let us know what can be done.

  • Hi, you should update the question with the systemctl commands that you used: some may well block access to the system

  • Most probably, it's a iptables/firewall issue.

  • Do you have previous snapshot that you can rollback to?

  • Also, what is the error you are getting please?

asked 9 months ago176 views
1 Answer
0

Hey – To help narrow the scope of your issue could you provide the error or what happens when you try to SSH? Does it timeout?

A few other questions / comments:

Have you tried instance connect via the Console?

Verify the current IP Address of the instance (assuming an elastic/static IP is not assigned).

If you have snapshot or backup of the instance try launching a new instance in the same subnet and test for connection.

If possible, try from another local network or source.

Verify security group and ACL rules.

Verify that nothing has changed with the route table or internet gateway.

Verify the key pair being used.

https://repost.aws/knowledge-center/ec2-linux-ssh-troubleshooting

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html

answered 8 months ago
AWS
SUPPORT ENGINEER
reviewed 8 months 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.

Guidelines for Answering Questions