Updated on 2024-05-15 GMT+08:00

Unbinding a Key Pair

When you use a key pair to log in to an ECS, and you need to change the login mode to Password, unbind the key pair on the KPS management console. 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 whose key pair is to be unbound 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 a password for logging in to the ECS, or you have forgotten your password, reset the login password on the ECS management console. For details, see Elastic Cloud Server User Guide.
  • If you set login mode to Key Pair when you create the ECS, after the key pair is unbound, shut down the ECS first to bind a key pair again.
  • To log in to the ECS, after you unbind the key pair, reset the password in time on the ECS console. For details, see Elastic Search 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. Locate the target ECS and click Unbind.

    • 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.

  4. The default port number is 22 and can be modified.

    Before using user-defined port, ensure that:

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

    To log in to the ECS, after you unbind the key pair, reset the password in time on the ECS console. For details, see Elastic Search Server User Guide.