To fix delay in SSH Login
DNS lookup query is responsible for the delay because SSH wait for a response of reverse DNS lookup query that is been made to DNS Server.
Solution :
To overcome this issue, please follow these steps:
- Edit /etc/ssh/sshd_config on sshd Server
vi /etc/ssh/sshd_config
and add following DNS option to the file:
UseDNS no
save and exit
- Add the following line to your /etc/resolv.conf file.
options single-request-reopen
- Restart sshd service
/etc/init.d/sshd restart
That’s it 🙂