SSH remote connection to other hosts, the reason why the wait time is too long.

Source: Internet
Author: User

SSH remote connection log in to another host, enter the login user name, wait a long time, and then appear the prompt to enter the password. There are two reasons why the time is too long and too slow.
(1) When using SSH telnet to an IP, the host system of this IP will read the/etc/ssh/sshd_config configuration, where there is a "Usedns yes" in the file, although this is annotated with "#", but by default, he is started, This sentence means to allow the system according to the/ETC/RESOLVE.CONF domain Name service to resolve this IP, reverse IP to take a certain amount of time, if the DNS server does not record the IP corresponding domain name, it has been queried until the DNS query time-out, which is very time consuming.
Modified by: In/etc/ssh/sshd_config will Usedns no should be usedns no or directly add a row Usedns no
If the service does not require to connect to the outside network, also so direct/etc/resolve.conf change/etc/resolve.conf.bak Let the DNS server does not go back to resolve

Restart the sshd service, re-use the remote host SSH remote, found a lot faster


(2) This situation in the case of the local host or remote host to start the graphics, it is obvious that the parameter appears to be in the graphics certification, the specific function is not clear, but after the modification can significantly improve the SSH telnet speed. (Certification of graphics parameter mode)

Vim/etc/ssh/sshd_config

Modify the Gssapiauthentication parameter to No, the default is Yes
Restart the SSHD service and re-use SSH

SSH remote connection to other hosts, the reason why the wait time is too long.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.