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
- Log in to the management console.
- Click in the upper left corner of the management console and select a region or project.
- Click on the left. Choose .
- In the navigation pane on the left, click Key Pair Service.
- Click the ECS List tab, locate the target ECS in the list, and click Unbind in the Operation column.
- 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?.
- The default port number is 22 and can be modified.
Before using user-defined port, ensure that:
- The key pair can be connected to the ECS using the port. For details about how to modify the security group configuration of an ECS, see Configuring Security Group Rules.
- Modify the default port of the ECS and ensure that the port is enabled. For details, see Enhancing Security for SSH Logins to Linux ECSs.
- Read and select I have read and agree to the Key Pair Service Disclaimer.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot