Linux system is slow to connect

Source: Internet
Author: User

When using SSH, there are times when connecting to a server is very slow, usually displays the information, and then the card is not moving.

Connecting to 10.10.10.10:22...connection established. To escape to local shell, press ' ctrl+alt+] '.

After a long time, information similar to the following will be displayed

Last Login:mon June 3 13:19:59 from 10.10.10.1

This problem occurs because the SSH default has a configuration item Usedns (The document explains this configuration entry means:usedns Specifies whether sshd should look up the remote host name and C Heck that the resolved host name is the remote IP address maps back to the very same IP address. The default is "Yes". )

When this configuration is not turned on the default value is Usedns Yes, which will cause SSH to be connected to the time of the DNS resolution, so there will be a long pause, so to resolve this issue can be opened this configuration item, and then the value to no, the operation is as follows:

Vim/etc/ssh/sshd_config

Remove the comment from line 5th and change the value to No

#Compression delayed#clientaliveinterval 0#clientalivecountmax 3#showpatchlevel nousedns no#pidfile/var/run/ Sshd.pid#maxstartups 10#permittunnel no#chrootdirectory None

Then restart the sshd service.



This article is from "Little public who" blog, please make sure to keep this source http://xiaogongju.blog.51cto.com/12830710/1982062

Linux system is slow to connect

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.