Ssh – How to rename a key pair in AWS

amazon-web-servicesssh

I am using a key pair called 'newkey' on many instances. I wish to keep using this key, but change the name of the key pair (obviously 'newkey' is quite vague, and won't be new forever).

Please note: there are a lot of similar questions, like https://stackoverflow.com/questions/7881469/change-key-pair-for-ec2-instance, about changing the keypair on a running instance. This is a different topic.

Best Answer

You cannot rename an existing keypair via the console or the API. You can import an existing key pair, however, so you could delete they keypair and import it with a new name..