Effective Solution to ssh connection timeout (usedns option of ssh)

Source: Internet
Author: User


An effective solution to ssh connection timeout (ssh usedns option): When logging on to the server via ssh, you always have to wait for a moment before connecting, this is because the OpenSSH server has a DNS search option, UseDNS is enabled by default. When the UseDNS option is enabled, when the client attempts to log on to the OpenSSH server, the server first performs reverse dns ptr query based on the client's IP address to query the client's host name, then, based on the queried client host name, the DNS performs A forward A record query to verify whether it is consistent with the original IP address. This is A method to prevent Client Spoofing, but generally our IP address is dynamic, no PTR record exists. Opening this option is just a waste of time.
Modification Method: www.2cto.com 1. Add UseDNS no configuration in the/etc/ssh/sshd_config configuration file of the server. 2. Restart ssh. /Etc/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.