Help Center> Bare Metal Server> FAQs> Login FAQ> What Do I Do If I Can't Log In to a Linux BMS?
Updated on 2024-05-15 GMT+08:00

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.

  1. Log in to the management console.
  2. Under Computing, click Bare Metal Server.
  3. 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.

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

  1. Log in to the BMS and run the following command to edit the /etc/fstab file:

    vi /etc/fstab

  2. 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.

    Figure 1 Data disk configuration in the 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 the BMS settings.
  1. Check whether the BMS sshd process is running.
  2. Check whether the BMS rejects access by the local PC.
    1. Log in to the BMS and run the following command:

      vi /etc/hosts.deny

    2. If the IP address of the local PC is contained in the file, the IP address is rejected. In such a case, delete the IP address from the file.
  3. 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.

Login FAQ FAQs

more