Slow ssh intranet logon and slow vsftpd logon

Source: Internet
Author: User
Tags reverse dns
Problem description: a recently deployed website project implements server cluster deployment (LVS + KEEPALIVED, RHCS, HA ), all ssh remote logins to n machines log on to a server in the cluster using an Internet IP address, and then log on to other machines using the ssh command, the problem is that after you enter the password on another machine through IPssh on the intranet, the cluster will wait 10-20 seconds to log on successfully. I have never cared about this problem. I think it is a problem with the intranet network, because the network does not belong to me, but I can't bear it anymore.

Problem description: a recently deployed website project implements server cluster deployment (LVS + KEEPALIVED, RHCS, HA ), all ssh remote logins to n machines log on to a server in the cluster using an Internet IP address, and then log on to other machines using the ssh command, the problem is that, after you enter the password for ssh to another machine through the intranet IP address in the cluster, it will wait 10-20 seconds to log on successfully. I have never cared about this problem. I think it is a problem with the intranet network, because the network does not belong to me, but I can't bear it anymore.

Finally, Google and Baidu sorted out the following solutions (the problem was due to the sshd configuration)

# Vi/etc/ssh/sshd_config

To modify the sshd configuration file, follow these steps:

1. disable reverse DNS resolution
UseDNS no

2. by default, the system has a record that ignores previously logged-on hosts. opening this record will basically resolve the issue of slow logon.
IgnoreRhosts yes

3. modify the value of "GSSAPIAuthentication" to "no" (add this configuration option if not, just comment it out)
GSSAPIAuthentication no
GSSAPICleanupCredentials no

4. restart the SSH service.

# Service sshd reload

Finally, you can debug through ssh-v host to find out which address has a long wait time during ssh logon.

In addition, there is a need to migrate phpwind from the old system in the project, phpwind version v8.7 (same junk programs ), I am used to using complicated passwords when deploying and configuring servers. (this sets a trap for myself, but phpwind works well. Otherwise, how can I set a trap for myself ), the problem is that phpwind will filter the form data submitted in the background, so it is difficult. After I configure the ftp account and password for ftp remote attachments in the phpwind background, it is always impossible to upload attachments on the front-end. there are no problems with ftp software on various clients (I want to die). after finally troubleshooting the program, the ftp account and password have been filtered out by some characters, fuck me (never mention phpwind garbage again ).

The solution to vsftpd slow logon is as follows:

Check the content of/etc/resolv. conf, which is generally a DNS problem. modify the DNS configuration, for example:
Nameserver 8.8.8.8
Nameserver 8.8.4.4


Related Article

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.