On Amazon EC2 is it possible to reassign a keypair to an already running instance?

后端 未结 3 975
夕颜
夕颜 2021-01-12 19:32

On Amazon EC2 is it possible to reassign a keypair to an already running instance?

I am having problem with a particular keypair and am wondering if there is a way t

3条回答
  •  别那么骄傲
    2021-01-12 19:40

    Probably ... just guessing based on what I've done in a few instances:

    1. Log into the instance with ssh. If that's the problem, you're pretty much stuck
    2. SFTP the public key from the new pair and put it in place in the .ssh authorized keys
    3. Restart the sshd

    Now, try accessing with the private key that matches the public one you put in place.

    But I fear the problem you have is getting in when the pair AWS put in place has gone bad. No help there.

提交回复
热议问题