EC2 Key Pair Change

后端 未结 5 798
轮回少年
轮回少年 2021-01-06 08:11

I have seen several questions and answers about changing the EC2 key pair for a running instance. However I am a complete AWS newbie at this point and I can easily stop the

5条回答
  •  长情又很酷
    2021-01-06 08:41

    You are sort of out of luck with regards to changing the key pair associated with the instance. What you can do, though, is one of the following:

    • Create a new account with equivalent privileges to the one associated with your key pair, and generate a key pair for that account. Disable the account you wish to deprecate (the one associated with the existing key pair), and delete it from your key pair list. WARNING: if you do what I just wrote in the wrong order, you are out of luck.
    • This should work. Emphasis on "should." I believe you can create an AMI image from your existing machine. Then you can just recreate it and associate it with a new key pair, then terminating your old one.

    For future reference, best practice would be to have a common key file that is not accessible to everyone to create EC2 instances, then assign credentials for people to do work on them.

提交回复
热议问题