1

I lost my pem file. So i followed the steps given in https://www.youtube.com/watch?v=F8jXE-_hdfg to restore the instance by changing the authorized_keys in root volume. Once it attached the instance in "dev/xvda" (root). I am still facing issue in connecting to this ec2 instance with a new key pair.

Description in ec2 instance still shows old KP name. I am getting below message while trying to connect as "ec2-user" with new KP.

enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

1

You can use aws session manager to login into the instance. Once you are logged in then you can get your .pem file. Have a look here How to access EC2 Instance even if PEM file is lost

mk23
  • 1,257
  • 1
  • 12
  • 25