Linux SSH connection login delay solution

  
                  

SSH connection login delay is generally because sshd opens the reverse DNS resolution by default.

Modify the /etc/ssh/sshd_config of the ssh server and change the UseDNS yes to UseDNS no.


However, today I encountered Anonomous Ubuntu, there is still a delay in connecting to the modified server.


Found a solution:


Edit /etc/nsswitch.conf


Find the hosts line and change it to the following This way:


hosts: files dns [NOTFOUND=return]


The test results are good.

Copyright © Windows knowledge All Rights Reserved