All Products
Search
Document Center

Elastic Compute Service:Unbind an SSH key pair

Last Updated:Mar 26, 2024

If you no longer require an SSH key pair, you can unbind the SSH key pair from the related Elastic Compute Service (ECS) instances to improve the instance security or restrict access permissions. For example, if an SSH key pair is expired or rotated or a user no longer needs to access an ECS instance to which an SSH key pair is bound, you can unbind the SSH key pair. This topic describes how to unbind an SSH key pair from one or more ECS instances.

Usage notes

If you unbind an SSH key pair from an instance and want to use password-based logon, you must reset the password of the instance before you can log on to the instance by using a password. For more information, see Reset the logon password of an instance.

Note

If you reset the password for an instance before you unbind an SSH key pair from the instance, you can log on to the instance by using the new password after you unbind the SSH key pair.

Unbind a key pair from an ECS instance

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the instance from which you want to unbind an SSH key pair and choose 更多 > Instance Attributes > Unbind Key Pair in the Actions column.

  5. In the Unbind Key Pair message, click Unbind.

  6. Start or restart the instance 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.

Unbind a key pair from multiple ECS instances at a time

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Network & Security > Key Pairs.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the SSH key pair that you want to unbind and click Unbind in the Actions column.

  5. In the Unbind dialog box, select the instances from which you want to unbind the SSH key pair and click the > icon to move the instances to the Selected section. Then, click OK.

  6. Restart or start 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.