- Documentation
Elastic Compute Service
Elastic Compute Service
User Guide
Security
Passwords and key pairs
Key pairs
Disassociating key pairs from instances
Key pairs
Disassociating key pairs from instances
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:
- 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.
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
- In the top menu bar, select the region and project where the key pair is located.
- Click "Unbind instances" in the "Actions" column of the target key pair.
- 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.
- 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.
- Click "Save" to complete the operation.
- In the top menu bar, select the region and project where the instance is located.
- In the left-side navigation pane, select "Instances & Images > Instances" to go to the Instances page.
- Click "... > Instance property > Unbind key pair" in the "Actions" column of the target instance.
- On the "Unbind key pair" page, confirm the details of the instance to be disassociated.
- Select "Agree to restart 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.
- Click "OK" 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