SSH connection Slow processing mode

Source: Internet
Author: User

Problem Description: recently connected to the server is particularly slow (first through the SECURECRT tool connection is slow, and then on other Linux SSH command connection is also the same, from these two points can be excluded from the connection tool problem, the remaining is the SSHD service, but only slow connection, From this point of the problem should be in the establishment of the connection, so the online search for information, users encounter problems and solutions are similar, so the process of a little record .


We generally deal with the idea:

1, to establish a connection to print the entire connection process, find time-consuming Project 2, verify whether the item is a connection must be established, if not close 3, turn off the DNS reverse resolution enabled in SSHD 4, after restarting the service to verify whether it has been resolved

Processing process:

1. Print the connection process information via SSH's-v parameter

# ssh-v [email protected]

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/83/DC/wKioL1d-LtqQU3BDAAHs-UVKxrI794.png-wh_500x0-wm_3 -wmp_4-s_2644835010.png "title=" 11.png "alt=" Wkiol1d-ltqqu3bdaahs-uvkxri794.png-wh_50 "/>

The red part of the figure is a long pause in the connection process.

2. Close GSSAPI authentication and DNS resolution

Sed-i ' s/^gssapiauthentication\syes$/gssapiauthentication no/;s/^ #UseDNS \syes$/usedns no/'/etc/ssh/sshd_config

3. Restart the SSHD service and verify

/etc/init.d/sshd restart

4, if the Linux side with SSH connection is relatively slow, you need to modify the/etc/ssh/ssh_config file on the connection side.

Gssapiauthentication Yes #将GSSAPIAuthentication关键字后的yes改为no


This article is from "a bit of those years" blog, please be sure to keep this source http://wangzz.blog.51cto.com/10856583/1812419

SSH connection Slow processing mode

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.