You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Key pairs
Disassociating key pairs from instances
Copy page
Download PDF
Disassociating key pairs from instances
If you want to change the key pair associated with an instance or switch its login credential from a key pair to a password, follow the steps in this topic to disassociate the key pair from the instance in the console.​
Prerequisite​
You can disassociate a key pair from an instance only when the instance is installed with the reset-authentication plug-in.​
tip​
Method for querying whether an instance has the reset-authentication plug-in installed:​
  1. Execute the systemctl status reset-authentication command.​
  • If reset-authentication.service could not be found. is returned, the reset-authentication plug-in is not installed.​
  1. Install the reset-authentication plug-in before you perform the steps in this topic.​
Usage notes​
  • Currently, you can disassociate a key pair from an instance only when the instance is in the Running or Stopped status.​
  • After a key pair is disassociated from an instance, the key pair is no longer valid. If password-based login is enabled for the instance, you can still log in to the instance by using the password after the key pair is disassociated from the instance. Otherwise, you need to re-associate a key pair with the instance or reset the password before you can log in to the instance. Proceed with caution.​
  • Each time you disassociate a key pair from an instance, you need to restart the instance for the disassociation to take effect. If you disassociate key pair A from an instance without restarting the instance, associate and disassociate key pair B, and then restart the instance, the disassociation of key pair B does not take effect. The instance remains associated with key pair A.​
Procedure​
​
Disassociate on the Key Pair page
Disassociate on the Instances page
​
  1. Log in to the ECS console. ​
  1. In the top menu bar, select the region and project where the key pair is located. ​
  1. Click "Unbind instances" in the "Actions" column of the target key pair.​
  1. On the "Unbind instances" page, select the instances to be disassociated from the list on the left. After selection, the instances automatically appear in the selected instances list on the right.​
  1. Select "Restart selected instances now" to make the operation take effect.​
tip​
During the restart process, instances whose status is Running are restarted by default, and instances whose status is Stopped are started.​
  1. Click "Save" to complete the operation.​
​
Results verification​
After you disassociate a key pair from an instance, you can view the instances associated with the key pair on the "Bound Instances" tab of the key pair details page, or check whether the key pair is displayed in the "Key pair" field on the "Overview" tab of the instance details page.​
Related document​
Last updated: 2026.06.18 17:49:49