Skip to main content

Modify the key pair of a VM

You can replace the key pair assigned to a VM (Virtual Machine).

When you modify a key pair with the console or the API (Application Programming Interface), the metadata of the VM is modified to reflect the new public key, but the replacement is not yet taken into account by the operating system of the VM. To finalize the change and concretely apply the new key pair, you must perform further actions inside the VM.

Permissions

info

This action requires the following IAM (Identity and Access Management) permissions:

  • compute.vm.update
  1. From the left-hand side menu, click ComputeVM;
  2. Select the VM whose key pair you want to modify;
  3. Click the Modify the key pair action;
  4. Select the new key pair from the drop-down list;
  5. Click Confirm.