Linux tips: Troubleshoot SSH connection latency issues

Source: Internet
Author: User
Troubleshoot SSH connections waiting a few seconds

Peacetime when we connect ssh, often have to wait 5 seconds or longer, to connect, because it is a virtual machine, the host through Vmnet8 and virtual machine is the same network segment, there is no delay problem, that must be virtual machine sshd configuration problem. Annoyed for a long time, suddenly any classmate mentioned sshd_config a parameter configuration Usedns can solve this problem, online check information, sure enough to have an impact, explanation is this: SSH although with IP connection, but SSH connection, the server will check the IP PTR record, Because the PTR record is not found and the last error is returned to respond to the client's connection, the client is waiting until the usedns is shut down to resolve the problem. 1. Back up and modify/etc/ssh/sshd_config, change Usedns to No

#ShowPatchLevel Nousedns No #PidFile/var/run/sshd.pid

2. Restart the SSHD service

/etc/init.d/sshd restart

Over

This article is from the "top of Operations" blog, please be sure to keep this source http://trnux.blog.51cto.com/6998102/1657309

Linux tips: Troubleshoot SSH connection latency issues

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.