내용으로 건너뛰기

Ec2 instance - SSH not working now

0

I have an ec2 instance that I have been using from a long time. I was able to do ssh to the instance earlier. Today, I upgraded the OpenSSH version in the same. I am no longer able to SSH to the instance via any of the methods.

Is there any workaround way of getting the console access so that I can resolve the SSH issue with the Ec2 instance?

It is urgent!

질문됨 2년 전687회 조회

3개 답변
3

Have you tried connecting to the EC2 via systems manager? It will require access to SSM and have the correct IAM Role

https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html#start-sys-console

전문가

답변함 2년 전

전문가

검토됨 2년 전

전문가

검토됨 2년 전

1
전문가

답변함 2년 전

0

Hello Arshaan

Check once these steps it help to resolve your issue:

There are a couple of workarounds you can try to regain access to your EC2 instance after an SSH upgrade issue:

Security Group Check: Double-check your security group configuration. Ensure the inbound rule allowing SSH access (port 22) is still active and configured correctly. This includes verifying the source (your IP address or a wider range for testing purposes) and that the instance state is running.

AWS Systems Manager Rescue: If the security group looks fine, AWS offers an "EC2Rescue" feature through AWS Systems Manager. This launches a temporary instance in your VPC and allows you to attach the root volume of your original instance. With this access, you can potentially fix the SSH issue on the original volume.

  • Make sure your EC2 instance is in a public subnet with a route table pointing to an internet gateway.
  • Verify you're using the correct public IP address for the instance (it might have changed if you restarted it).
  • Consider temporarily widening the source for the SSH access rule in your security group for troubleshooting purposes (0.0.0.0/0), but remember to tighten it back to a more secure configuration later.
전문가

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠