What Should I Do If I Cannot Obtain the Password for Logging In to My Windows ECS Authenticated Using a Key Pair?
Symptom
A private key cannot be used to obtain the password for logging in to a Windows ECS that is authenticated using a key pair.
Possible Causes
- A network fault, leading to the failure of the connection from the ECS to the Cloudbase-Init server.
- No configuration on the image for Cloudbase-Init to obtain the password.
- Other reasons.
Solution
If logging in to an ECS with Cloudbase-Init enabled failed, perform the following operations to locate the fault:
- Ensure that Cloudbase-Init has been correctly configured on the image based on which the ECS was created.
- If Cloudbase-Init has not been configured, your ECS will not allow customized configurations, and you can log in to it using the original image password only.
- The ECSs created using a public image have had Cloudbase-Init installed by default. Therefore, you do not need to install and configure Cloudbase-Init anymore.
- If your ECS is created using an external image file, install and configure Cloudbase-Init.
For details, see Installing and Configuring Cloudbase-Init.
- Ensure that the key pair for logging in to the ECS is correct.
The key used for obtaining the password must be the key used during the ECS creation.
- Ensure that DHCP is enabled in the VPC to which the ECS belongs.
On the management console, check whether DHCP has been enabled in the target subnet.
Figure 1 DHCP
- Ensure that the ECS has an EIP bound.
- Ensure that traffic to and from port 80 is allowed in security group rules. Figure 2 Security group rules for port 80
- Check Cloudbase-Init logs to identify the cause.
- Stop the affected ECS and detach the system disk from it. Figure 3 Detaching the system disk
- Use a public image to create a temporary Windows ECS and attach the system disk detached in 6.a to the ECS.
- Log in to the temporary ECS, open the Server Manager page, choose File and Storage Services > Volumes > Disks, right-click the offline disk, and choose Online from the shortcut menu. Figure 4 Setting disk online
- Switch to the cloudbase-init file in /Program Files/Cloudbase Solution/Cloudbase-Init/log of this disk to view the log for fault locating. Figure 5 cloudbase-init
- Stop the affected ECS and detach the system disk from it.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.