This topic describes how to unbind an SSH key pair from one or more Elastic Compute Service (ECS) instances.
Scenarios
In the following scenarios, you can unbind SSH key pairs:
Replace the SSH key pair that is bound to an ECS instance
If you want to replace the SSH key pair that is bound to an ECS instance, unbind the key pair from the instance before you bind a different key pair to the instance.
Change the logon method of ECS instances to password-based logon
If you want to change the logon method of an ECS instance from key pair-based logon to password-based logon, unbind the key pair from the instance.
Unbind a key pair from an ECS instance
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Find the ECS instance from which you want to unbind a key pair. In the Actions column, choose .
In the Unbind Key Pair message, click Unbind.
Start or restart the instance for the operation to take effect.
If the instance is in the Running state, restart the instance. For more information, see Restart an instance.
If the instance is in the Stopped state, start the instance. For more information, see Start an instance.
Unbind a key pair from multiple ECS instances at a time
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Find the key pair that you want to unbind and click Unbind in the Actions column.
In the Unbind dialog box, select the instances from which you want to unbind the key pair, click the > icon to move the selected instance to the Selected column, and then click OK.
Start or restart the instances for the operation to take effect.
If an instance is in the Running state, restart the instance. For more information, see Restart an instance.
If an instance is in the Stopped state, start the instance. For more information, see Start an instance.
What to do next
After a key pair is unbound from an instance, you must reset the password for the instance. This way, you can use the new password to log on to the instance. For more information, see Reset the logon password of an instance.
If you have reset the password for the instance before you unbind the key pair, you can log on to the instance by using the new password after you unbind the key pair.