What Do I Do If I Can't Log In to a Linux BMS?
If you cannot log in to a BMS using SSH, it is recommended that you log in to the BMS through the console.
Check Whether You Can Remotely Log In to the BMS Through the Console
If the SSH login fails, check whether you can remotely log in to the BMS through the management console.
- Log in to the management console.
- Under Computing, click Bare Metal Server.
- Locate the row that contains the target BMS and click Remote Login in the Operation column.
After about one minute, the login page is displayed. Press Enter and enter username root and the password.
Learn about the preparations for logging in to a BMS.
If you are still unable to log in to the BMS, record the related BMS information and the time when the login failure occurred. Then, submit a service ticket. Contact Huawei Cloud technical support.
Troubleshoot
If you can log in to the BMS remotely but cannot log in to it using SSH, do as follows:
Check Network Connectivity
Check whether the EIP bound to the BMS can be pinged. If the EIP cannot be pinged, check whether the following rule has been added to the security group. If it is not, add it.
Protocol |
Direction |
Port Range |
Source |
---|---|---|---|
ICMP |
Inbound |
All |
0.0.0.0/0 |
Then, try to remotely log in to the BMS again.
Check Whether the Security Group Is Correctly Configured
Check whether port 22 of the security group is allowed. If it is not, add a security group rule to allow it.
Then, try to remotely log in to the BMS again.
Check Whether Non-System Disk Information Is Commented Out in the /etc/fstab File
- Log in to the BMS and run the following command to edit the /etc/fstab file:
vi /etc/fstab
- Comment out the data disk configuration in the /etc/fstab file.
The /etc/fstab file contains information about the file systems and storage devices automatically attached to the BMS when the BMS starts. The configuration information about data disks automatically attached to the BMS needs to be commented out. For example, the last row shown in Figure 1 is the data disk configuration to be commented out in the /etc/fstab file.
After performing the preceding operations, restart the BMS and try to remotely connect to it.
Check the Port for Remotely Accessing the BMS
- Check whether the BMS sshd process is running.
- Check whether the BMS rejects access by the local PC.
- Open the /etc/ssh/ssh_config file on the local PC and check the default login port. In addition, check whether the value of the port field (SSH-enabled port) in the /etc/ssh/sshd_config file of the BMS has been changed (the default port number is 22).
Then, try to remotely log in to the BMS again.
Check the CPU Load
Check whether the login failure is caused by high CPU usage. If yes, perform the following operations to reduce the CPU usage:
- Stop some processes that are not used temporarily and try again.
- You can also restart the BMS.
The restart operation will stop the server and interrupt services. Exercise caution when performing this operation.
- Reinstall the OS.
Reinstalling the OS is a high-risk operation. Back up data before the reinstallation.
Then, try to remotely log in to the BMS again.
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