Solve the problem of slow SSH Login (must be modified on the remote host)

Source: Internet
Author: User
This article from: http://forum.ubuntu.org.cn/viewtopic.php? F = 54 & t = 177845

Friends who often use Ubuntu can get used to the fact that

That is, it takes more than 10 seconds or even more than 20 seconds to log on to Ubuntu through SSH. You may be used to this fact, but, in fact, this long wait time can be avoided. How can this problem be avoided, follow the steps below to disable SSH gssapi authentication VI/etc/ssh/ssh_config and comment out the following two lines: gssapiauthentication yesgssapidelegatecredentials no step 2 disable SSH usednsvi/etc/ssh/sshd_config. Note: the sshd_config file of ubuntu does not have the usedns parameter. As far as I know, the sshd_config of * nix and * BSD operating systems all have usedns parameters, and the default values are "usedns yes ", it is estimated that although the Ubuntu sshd_config does not have usedns, it is also "usedns yes" by default. Therefore, insert the following line at the end of sshd_config: US Edns no and then execute the command "/etc/init. d/ssh restart ", restart the SSH service, and the configuration takes effect after testing. After using this method, the Ubuntu authentication time is greatly shortened, in the past, the login authentication generally took about 15 seconds over 10 seconds. In some cases, it even took about 20 seconds to 30 seconds, the login authentication time for Ubuntu will be shortened to less than 3 seconds.

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.