Modifying the Keypair Used by an Instance

You can replace the keypair used by an instance with another keypair.

This action only updates the public key reported by the metadata of the instance. To complete the replacement, you need to manually replace the old public key with the new public key in the ~/.ssh/authorized_keys file located inside the instance. You then need to restart the instance to apply the change.

You can also use this action to assign a keypair to an instance for which you did not initially specify a keypair.

To add a second keypair to an instance, paste the public key of the new keypair at the end of the ~/.ssh/authorized_keys file.

Modifying the Keypair Using Cockpit v1

The keypair of an instance can be modified in the MODIFY INSTANCE ATTRIBUTES dialog box.
For more information, see Modifying an Instance Attribute.

Modifying the Keypair Using OSC CLI