Updated on 2023-01-31 GMT+08:00

Unbinding a Key Pair

When you use a key pair to log in to an ECS, if you want to change the key pair mode to password, you can unbind the key pair on the management console. The KPS will unbind the key pair from the ECS. After the key pair is unbound, you can use the password to log in to the ECS.

Prerequisites

  • The ECS must be in the Running or Shut down state.
  • The ECS has been bound to a key pair.
  • The ECS to be unbound from its key pair uses the public image provided by Huawei Cloud.
  • To unbind from a key pair, you can delete the public key of the user from the /root/.ssh/authorized_keys file on the server. Ensure that the file is not modified before unbinding from the key pair. Otherwise, the unbinding will fail.

Constraints

  • If you have not set the password for logging in to the ECS or forget the login password, you can reset the login password of the ECS on the ECS console. For more information, see Elastic Cloud Server User Guide.
  • If you enabled key pair login for an ECS during its creation but unbound the key pair used for login, to bind the key pair again, shut down the ECS first.
  • After you unbound an ECS from its key pair, reset the password on the ECS console in a timely manner. For more information, see Elastic Cloud Server User Guide.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. Click . Choose Security & Compliance > Data Encryption Workshop.
  4. In the navigation pane on the left, click Key Pair Service.
  1. Click the ECS List tab.
  2. Click Unbind in the row of an ECS.

    • If the ECS is shut down, a dialog box will be displayed, as shown in Figure 1.
      Figure 1 Unbinding a key pair (1)
    • If the ECS is running, a dialog box will be displayed, as shown in Figure 2.
      Figure 2 Unbinding a key pair (2)

  3. If you unbind the key pair when the ECS is in the running state, you need to upload the private key. Click Select file to upload the private key (in the .pem format) of the existing key pair or copy the private key to the text box. If the ECS is shut down, skip this step.

    The private key to be uploaded or copied to the text box must be in the .pem format. If it is in the .ppk format, convert it by referring to How Do I Convert the Format of a Private Key File?

  4. Select I have read and agree to the Key Pair Service Disclaimer.
  5. Click OK. The key pair will be unbound from the ECS in about one minute.

    After you unbound an ECS from its key pair, reset the password on the ECS console in a timely manner. For more information, see Elastic Cloud Server User Guide.