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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南