How Do I Handle the Failure in Replacing a Key Pair?
Symptom
Failed to replace the key pair on the ECS.
The Failed Key Pair Task dialog box only records and displays failed key pair operations on ECSs, which do not affect the ECS status and subsequent operations. You can click Delete in the row of the failure record to delete it, or you can click Delete All to delete all failure records.
Possible Causes
- An incorrect or invalid private key has been provided.
- The inbound direction of port 22 of the ECS security group is not open to 100.125.0.0/16.
- SSH configuration of the ECS has been modified.
- The ECS has been shut down, started, or a disk has been detached during the process of replacing the key pair.
- The network connection is faulty.
- Firewall rules have been configured for the ECS.
Handling Procedure
- Use the SSH key pair to log in to the ECS and check whether the private key is correct.
- If it is correct, go to Step 2.
- If it is incorrect, use the correct private key to replace the key pair again.
- Check whether the /root/.ssh/authorized_keys file of the ECS has been modified.
- If yes, restore the original content of the /root/.ssh/authorized_keys file based on the site requirements.
- If no, go to Step 3.
- Check whether the inbound direction of port 22 of the ECS security group is open to 100.125.0.0/16. That is, 100.125.0.0/16 can remotely connect to Linux ECSs through SSH.
- If yes, go to Step 4.
- If no, add the following security group rule and replace the key pair again.
Direction
Protocol/Application
Port
Source
Inbound
SSH (22)
22
100.125.0.0/16
- Check whether the ECS can be powered on, shut down, and logged in to.
- If yes, replace the key pair again.
- If no, go to Step 5.
- Check whether the network is faulty.
- If yes, contact technical support to check and locate the fault.
- If no, replace the key pair again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.