Slow response to long wait time for SSH login in LAN

Source: Internet
Author: User
Tags ssh server

L fault symptom:

When you remotely log on to the server using the SSH tool, the logon prompt appears for a long time.

L search for problems:

You can add the "-V" parameter after the SSH command to output the debug information to locate the problem.

You will usually see information similar to this:

Debug1: Next authentication method: gssapi-with-mic

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

Cannot determine realm For numeric host address

L fault cause:

After reading the above output results, it is obvious that this is caused by DNS resolution problems.

1. Why does the DNS resolution service need to be used during SSH Login?

Let's take a closer look at the above debug output, which is a disaster caused by gssapi authentication.

2. Why does gssapi authentication need to be used during SSH Login?

Gssapi is an itef standard for implementing strong encryption authentication in network applications. It is enabled by default on servers that support SSH v2.

3. What are the causes of slowness?

By default, gssapiauthentication is activated on both the server and client. If there is a problem with the DNS service, the login process will not continue until the DNS query times out. This is why the SSH logon prompt takes a long time.

L solution:

1. If the remote SSH server cannot be modified, modify the SSH client configuration file.

# Vi/etc/ssh/ssh_config (take the Linux client as an example)

Set: gssapiauthentication No

2. modify the configuration of the remote SSH Server

# Vi/etc/ssh/sshd_config

Set: gssapiauthentication No

You can also choose not to use DNS resolution: usedns No

Restart the sshd service/etc/init. d/sshd restart

Slow response to long wait time for SSH login in LAN

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.