To resolve the SSH connection slow (sometimes wait half a minute before the password input prompt) method

Source: Internet
Author: User

Often through SSH or SCP to connect a bunch of remote host, also is the Linux host, some of them create SSH connection speed is very slow, the connection after the establishment of the operation speed is very normal, it seems that should not be a network cause. The workaround is to view the debug information by using the-v parameter of SSH:

Use Ssh-v to see the details of the connection establishment process, immediately with a very slow to establish a host to try, in a large pile of output information found here to stay the longest:

Debug1:authentications that can Continue:publickey,gssapi-with-mic,password
Debug1:next Authentication Method:gssapi-with-mic
Debug1:unspecified GSS failure. Minor code may provide more information
No Credentials Cache found

Debug1:unspecified GSS failure. Minor code may provide more information
No Credentials Cache found

Debug1:unspecified GSS failure. Minor code may provide more information

Debug1:next Authentication Method:publickey


The original is because of trying a meaningless and will fail the Gssapi-with-mic authentication method wasted Time, open (remote server)/etc/ssh/ssh_config the inside of the gssapiauthentication Yes to no turn it off, you can let SSH directly tries the wonderful PublicKey authentication method.

To disable the comparison of SSH connection time before and after Gssapiauthentication:

View Plaincopy to Clipboardprint?
[Email protected]:~$ time ssh [email protected] Exit

Real 0m18.488s
User 0m0.004s
SYS 0m0.008s
[Email protected]:~$ time ssh [email protected] Exit

Real 0m3.531s
User 0m0.016s
SYS 0m0.000s

To resolve the SSH connection slow (sometimes wait half a minute before the password input prompt) method

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.