Solution to fix SSH Login delay on Linux

Solution to fix SSH Login delay on Linux

This post has the Solution to fix SSH Login delay on Linux.

If you are interested in learning, Request you to go through the below recommended tutorial.

We may came across the situation that very long delay when we login to the server using SSH,
– Connection will be taking a fraction of second
– After/While entering the Password its taking more time to provide the shell prompt.

Here is a solution to fix this issue, this is related to DNS. We have to change dns related entries in ssh config file to reduce this delay.

Solution to fix SSH Login delay on Linux

Note : 
Be careful when doing this on production servers.
This activity may disconnect all the users from the system who are logged in to that machine using SSH.

By default UseDNS option in this file is disable. We have to uncomment this option and then edit this entry to no. As below..

[root@linux1 ~]# vi /etc/ssh/sshd_config

Just search for UseDNS..

[root@linux1 ~]#UseDNS yes

Change that to, (Simply Uncomment it)

UseDNS no

save and exit the file and then just reload ssh service to take effect what ever changes we did..

[root@linux1 ~]# service sshd reload

or

[root@linux1 ~]# systemctl reload sshd

Now try to login and observe, SSH Login delay will be fixed.

Hope this post helped you to fix SSH Login Delay Issue.

Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.