Can't update Key/Pair assigned at launch

0

We have an EC2 instance where one of the previous users updated the key/pair for SSH. We have tried most of the articles we found with no change in the key/pair.

I have updated the authorized_keys file with one of our pre-existing public keys but am not seeing any update/change on the instance details page or success connecting using SSH.

Is there something step or pre/post activity that I'm missing? Right now the only way we have to access that instance is via Session Manager

asked a year ago918 views
2 Answers
1

Editing the public key in authorized_keys does not change the key pair name listed on the instance details page.
However, if you have updated authorized_keys with the correct public key, you should be able to ssh setzu with the private key corresponding to the public key.

You can also try the following method to change the public key.
https://repost.aws/knowledge-center/user-data-replace-key-pair-ec2

profile picture
EXPERT
answered a year ago
0

The instance details page shows the key pair that was assigned at launch. The field name is "Key pair assigned at launch". If you change the key pair, or add key pairs to the instance, the value of "Key pair assigned at launch" does not change.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions