Resetting a Key Pair
If your private key is lost, you can use a new key pair to reconfigure the ECS through the management console. After resetting the key pair, you need to use the private key of the new key pair to log in to the ECS, and the original private key cannot be used to log in to the ECS.
This section describes how to reset a key pair on the KPS console.
Prerequisites
- The ECS whose key pair is to be reset uses the public image provided by Huawei Cloud.
- To reset the key pair, you can replace the public key of the user by modifying the /root/.ssh/authorized_keys file on the server. Ensure that the file is not modified before resetting the key pair. Otherwise, the reset will fail.
- The ecs must be in the Shut down state.
Procedure
- Log in to the management console.
- Click in the upper left corner of the management console and select a region or project.
- Click . Choose .
- In the navigation pane on the left, click Key Pair Service.
- Click the ECS List tab.
- Locate the target ECS and click Reset. The key pair reset dialog box is displayed, as shown in Figure 1.
- Select a new key pair from the drop-down list box of New Key Pair.
- The default port number is 22 and can be modified.
- Read and select I have read and agree to the Key Pair Service Disclaimer.
- Click OK. The ECS key pair will be reset in about 10 minutes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.