How do I change the SSH Key on a running EC2 instance?

To change the SSH key on a running Amazon EC2 instance, you must append the new public key to the instance's authorized keys file.

1. Create a new key pair from AWS Console.
2. Generate Public key from newly created key pair ( Private Key ).
3. Paste the generated public key ( from Step 2 ) in ~/.ssh/authorized_keys of Server.
4. Delete the existing key from ~/.ssh/authorized_keys of Server
5. Perform ssh using new key.


Пожалуйста, войдите, чтобы спрашивать, отвечать, делиться, ставить лайки и голосовать.