Ssh logon is slow, and the logon speed is normal after logon. There are two possible reasons for this situation:

Source: Internet
Author: User
Tags reverse dns

Logons are slow and the logon speed is normal after logon. There are two possible causes: 1. DNS reverse resolution
OpenSSH will verify the IP address when you log on. It uses reverse DNS to locate the host name based on the user's IP address, then uses DNS to locate the IP address, and finally matches whether the logon IP address is valid. If the IP address of the client does not have a domain name, or the DNS server is slow or inaccessible, it will take a long time to log on.
Solution:
You only need to modify/etc/ssh/sshd_config and set UseDNS to no:
Sed-I "s/# UseDNS yes/UseDNS no/"/etc/ssh/sshd_config

2. gssapi Problems
Use ssh-v user @ server to view the following information during logon:
Debug1: Next authentication method: gssapi-with-mic
Debug1: Unspecified GSS failure. Minor code may provide more information
Solution:
You can use ssh-o GSSAPIAuthentication = no user @ server to log on.
You can also modify/etc/ssh/ssh_config and set GSSAPIAuthentication no. Last/init. d/sshd restart/init. d/sshd restart

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.