You may expirence a ssh login dealy, between entering your username and the password prompt.
![Click on image to play gif 15 sec. ssh delay during login](http://svendsen.me/wp-content/uploads/2019/09/sshdelay-300x225.gif)
The cause of the delay, is when SSHD service performs reverse DNS lookup to the client’s ip address.
You can disable this feature in /etc/ssh/sshd_config
Start by makeing a backup of the file.
[Expert@gw2:0]# cp -v /etc/ssh/sshd_config /etc/ssh/sshd_config_ORIGINAL
Now edit the file with vim.
[Expert@HostName]# vi /etc/ssh/sshd_config
Search for this line “#UseDNS yes”
Push Insert button and add “UseDNS no” on the line below
The file should now look like this.
#ShowPatchLevel no
#UseDNS yes
UseDNS no
#PidFile /var/run/sshd.pid
MaxStartups 10:30:100
To quit and save your settings do the following.
1. Esc
2. Shift + Q
3. wq! + Enter (w for write q for quit)
Now you should be out of vim, and can restart the service with the command below.
[Expert@gw2:0]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[Expert@gw2:0]#
Now you whould no longer have SSH login delay. 🙂
For more info see Secure Knowledge article sk106497
Delay between user name and password prompts when log in to the gateway via SSH