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.
DevOps Full Course Tutorial for Beginners – DevOps Free Training Online
Docker Full Course Tutorial for Beginners – Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners – Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners – Ansible Free Training Online
Openstack Full Course Tutorial for Beginners – Openstack Free Training Online
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
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..
[[email protected] ~]# vi /etc/ssh/sshd_config
Just search for UseDNS..
[[email protected] ~]#UseDNS yes
Change that to, (Simply Uncomment it)
save and exit the file and then just reload ssh service to take effect what ever changes we did..
[[email protected] ~]# service sshd reload
[[email protected] ~]# 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.
Related Content on Linux might be useful to you to improve your Linux Skills.
How to Access Linux Server from Windows Remotely
Configure SSH Passwordless Login Authentication (SSH-keygen)
How to Create LVM Partition in Linux – LVM Tutorial
Install & Configure Samba Server on Linux (RHEL7 / CentOS7)