This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Wednesday, June 15, 2016

How to fix the delay in SSH Login

Have you ever faced  login delays  when you tried to connect to the Linux systems, if yes this is happening due to  reverse DNS look-up  query that is been made to DNS Server.

We can fix this issue as mentioned below steps:

1) Take /etc/ssh/sshd_config  backup

# cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config.`date '+%m-%d-%Y_%H:%M:%S'`

2) Edit  /etc/ssh/sshd_config  on sshd  Server

vi /etc/ssh/sshd_config

  And add this DNS option to the file:
  UseDNS no

3) Now add the following line to your /etc/resolv.conf

   options single-request-reopen

4) Restart ssh daemon

 service sshd restart

Sometimes adding the client's net address to the server's /etc/hosts can fix this issue  which is an alternative method.

No comments:

Post a Comment