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?

已提问 9 个月前187 查看次数
1 回答
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

已回答 9 个月前
AWS
支持工程师
已审核 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则