Help Center> Bare Metal Server> FAQs> Login FAQ> What Do I Do If the SSH Login or Data Transmission Is Slow?
Updated on 2022-07-13 GMT+08:00

What Do I Do If the SSH Login or Data Transmission Is Slow?

Symptom

The login to Linux BMSs or data transmission between Linux BMSs in SSH mode is slow because UseDNS is enabled for SSH.

UseDNS is an enhanced security feature of SSH and is enabled by default. In such a case, the server obtains the host name of a client by locating the PTR record of the client IP address through a reverse DNS query. Then, the server performs a DNS query based on the obtained client host name and checks whether the obtained IP address is the same as the original IP address, preventing client spoofing. Generally, clients use a dynamic IP address and do not have a corresponding PTR record. Therefore, this feature is invalid for information comparison. However, this feature increases the delay and thereby slows down the client connection.

Solution

  1. Log in to the BMS remotely.
  2. Run the following command to open the /etc/ssh/sshd_config file:

    vi /etc/ssh/sshd_config

  3. Find the following field:
    #UseDNS yes

    Add the following information in a new line after the field:

    UseDNS no
  4. Save the configuration and restart SSH.

    service sshd restart

Login FAQ FAQs

more