Ir para o conteúdo

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!

feita há 2 anos687 visualizações

3 Respostas
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

ESPECIALISTA

respondido há 2 anos

ESPECIALISTA

avaliado há 2 anos

ESPECIALISTA

avaliado há 2 anos

1
ESPECIALISTA

respondido há 2 anos

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.
ESPECIALISTA

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.