Why Can't I Log In to My Linux HECS?
Symptom
An HECS cannot be remotely logged in for some reason. For example, the network is malfunctioning, the local port for accessing the remote desktop is denied on the firewall, or the HECS vCPUs are overloaded.
If this issue occurs, log in to the HECS by referring to Attempting Login Using VNC. Then, locate the fault based on Fault Locating.
Attempting Login Using VNC
If the remote login fails, log in to the HECS using VNC on the management console.
Learn the preparations for logging in to an HECS by referring to What Should Be Prepared for Logging In to an HECS?.
- Log in to the management console.
- Under Computing, click Hyper ECS.
- In the Operation column of the target HECS, click Remote Login. Figure 1 Remote Login
If the login fails, record resource information and the time when the fault occurred, and then submit a service ticket for technical support (click Service Tickets in the upper right corner of the console and choose Create Service Ticket).
Fault Locating
If you can log in to the HECS using VNC but cannot log in to it using a remote desktop connection, locate the fault by following the following procedure.
Possible causes are listed here in order of their probability.
If the fault persists after you have ruled out one cause, move on to the next one.
| Possible Cause | Handling Measure |
|---|---|
| The HECS is frozen or stopped. | Ensure that the HECS is in the Running state. For details, see Checking the HECS Status. |
| Incorrect username or password. | The default username for Linux HECSs is root. If the password is incorrect, reset the password using the password reset function on the management console. For details, see Checking the Login Password. |
| The HECS is overloaded. | Check the bandwidth or vCPU usage of the HECS. If the bandwidth or vCPU usage is excessively high, login failures may occur. For details, see Checking the HECS Load. |
| No EIP is bound to the HECS. | Bind an EIP to the HECS if you want to log in to the HECS using an RDP file or remote desktop connection (MSTSC). For details, see Checking the HECS EIP. |
| The access is blocked by the Internet service provider (ISP). | Access the HECS using another hotspot or network. For details, see Checking the Network. |
| The remote login port is not allowed in the security group. | Ensure that the remote login port is allowed in the security group. For details, see Checking the Security Group Configuration. |
| The remote login port is incorrectly configured. | Configure the remote login port correctly on a local PC and the HECS. For details, see Checking the Remote Access Port. |
| An IP address whitelist for SSH logins has been configured. | Check whether an SSH login IP address whitelist is configured on the HECS. For details, see Checking the IP Address Whitelist for SSH Logins (with HSS Enabled). |
| An OS fault has occurred. | Ensure that the file system is not damaged. For details, see Checking the OS Fault. |
| Access is blocked by third-party antivirus software. | Disable or uninstall the third-party antivirus software and try again. For details, see Checking the Antivirus Software. |
| The cause is displayed in the error message. | If an error message is displayed during a remote login, check the operation guide based on the error information. For details, see Checking Whether an Error Occurred During the Remote Login. |
Checking the HECS Status
Check whether the HECS is in the Running status on the management console. If the HECS is stopped, start it and try again.
Checking the Login Password
Check the login password you set when or after you create the HECS.
- Set the password during HECS creation: Check whether the password is correct. If your password is forgotten, reset the password, restart the HECS, and log in to it using the new password.
- Set the password after HECS creation: If you choose not to set a password when you create the HECS, you can use the password reset function (available in the Operation column of the HECS) to obtain the login password after the HECS is created. Then, restart and log in to it using the new password.
Checking the HECS Load
If the bandwidth or vCPU usage is excessively high, you may fail to log in to the HECS.
If you have created an alarm rule using Cloud Eye, the system automatically generates an alarm when the bandwidth or CPU usage reaches the threshold specified in the rule.
To handle this issue, perform the operations described in Why Is My Linux HECS Running Slowly?.
- If the login failure is caused by high vCPU usage, perform the following operations to reduce the vCPU usage:
- Stop the processes that are not being used and try again.
- Restart the HECS.
- Reinstall the OS. Back up important data before the reinstallation.
- If the OS cannot be reinstalled due to important data, replace the disk attached to the HECS. To do so, back up the data on the original disk, detach the disk from the HECS, attach the new disk to the HECS, and copy the data to the new disk.
You can also upgrade the vCPUs and memory by modifying the HECS specifications.
- If the login fails because the bandwidth, check whether the bandwidth exceeds the configured bandwidth size. For details, see How Do I Check Whether the Bandwidth Exceeds the Limit?
After you perform the preceding operations, try to remotely log in to the HECS again.
Checking the HECS EIP
Bind an EIP to the HECS if you use CloudShell provided on the console or a remote login tool (such as PuTTY or XShell) to connect to a DB instance.
For details, see Binding an EIP to an ECS.
Checking the Network
Use a local PC in another network or use another hotspot to access the HECS. Check whether the fault occurs on the local network. If so, contact the carrier to resolve this issue.
After you perform the preceding operations, try to remotely log in to the HECS again.
Checking the Security Group Configuration
Check whether the local PC can access port 22 on the HECS:
telnet Private IP address of the HECS
If the port is inaccessible, check whether port 22 in the security group is allowed.
On the page providing details about the HECS, click the Security Groups tab and view port 22 in the inbound rule of the security group.
For instructions about how to modify a security group rule, see Modifying a Security Group Rule
After you perform the preceding operations, try to remotely log in to the HECS again.
Checking the Remote Access Port
- Verify that the sshd process is running.
- Check whether the local PC is restricted on the HECS.
- Switch to the ssh_config file in /etc/ssh on the local PC and view the default login port. Then, check whether the SSH-enabled port in the sshd_config file on the HECS has been changed (the default port number is 22).

After you perform the preceding operations, try to remotely log in to the HECS again.
Checking the IP Address Whitelist for SSH Logins (with HSS Enabled)
After HSS is enabled, you can configure an IP address whitelist for SSH logins as required. The IP address whitelist controls SSH access to HECSs, effectively preventing account cracking.
After you configure the whitelist, SSH logins will be allowed only from IP addresses in the whitelist.
- On the Events page, check whether a local host IP address is intercepted due to brute force cracking.
- Check whether the IP address whitelist for SSH logins has been enabled. If so, ensure that the IP address of the local host has been added to the IP address whitelist.
- Before enabling this function, ensure that all IP addresses that need to initiate SSH logins are added to the whitelist. Otherwise, you cannot remotely log in to your HECS through SSH.
- Exercise caution when adding a local IP address to the whitelist. This will make HSS no longer restrict access from this IP address to your HECSs.
For more details, see Security Configuration.
Checking the OS Fault
- Password injection failure
Failing to obtain a password is generally caused by a Cloud-Init-based password injection failure.
- File system damaged after a forcible stop
The file system may be damaged. As a result, the HECS fails to be restarted.
After you perform the preceding operations, try to remotely log in to the HECS again.
Checking the Antivirus Software
Third-party antivirus software may lead to an access failure to the HECS.
If third-party antivirus software is running, check whether the remote connection is blocked by the software. If so, add the EIP of the HECS to the whitelist and try to access the HECS again.
You can also disable or uninstall the third-party antivirus software and try again.
Checking Whether an Error Occurred During the Remote Login
If an error message is displayed during a remote login, check the operation guide based on the error information. The handling method is the same as that for an ECS. For details, see ECS FAQs Remote Login Errors on Linux.
If the error cannot be handled, record the message and the time when the error occurred. Then, click Service Tickets in the upper right corner of the management console, choose Create Service Ticket, and submit a ticket for technical support.
If the fault persists after you have performed the preceding operations, record the resource information and the time when the fault occurred. Then, click Service Tickets in the upper right corner of the management console, choose Create Service Ticket, and submit a ticket for technical support.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.