Slow solution using SSH to access remote hosts

Source: Internet
Author: User

Recently in the use of SSH remote access to the Linux server, found that some machine access quickly, enter the user name, immediately appear to enter the password prompts, immediately after entering. (Senior has made the change)

However, most of our servers need to wait a few 10 seconds before the prompt to enter a password appears. Asked the next brother, senior said there is a DNS reverse resolution problem, the Internet search it.

Got the result:


"Analysis results, the main reason is: DNS resolution IP caused by the use of the following types of analysis processing methods

1, in the server/etc/hosts file in your native IP and hostname to join
2. Modify or join Usedns=no in/etc/ssh/sshd_config file on server
3. Comment off all IP rows not used in/etc/resolv.conf on the server
4, modify the server on the/etc/nsswitch.conf hosts for Hosts:files
5. Authentication gssapi-with-mic may also have problems, modifying Gssapiauthentication No in/etc/ssh/sshd_config files on the server. /etc/init.d/sshd Restart Restart the sshd process to make the configuration effective.
If the server was previously configured with a dual NIC, so that a row in the/etc/resolv.conf file a line of the current unused IP address. Comment or delete the line. “

Reference: http://www.hao32.com/unix-linux/491.html


I tested the mode 2 on my two servers, and it was easy to use. respectively, SUSE11 and Fedora 17.

When you are ready, remember to restart the SSHD service .

SUSE:/etc/init.d/sshd Restart

Fedora 17:systemctl Restart Sshd.service

Then, and then login again, found that the user name entered immediately after the choice of input password. Oh, also

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.