SSH Connection: Wait long after entering username – ssh password prompt delay

Updated on March 11, 2019
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

When I make ssh connection I get long wait just after entering username. It’s most likely that ssh daemon  is set up to do a DNS reverse-lookup on the host that’s connecting. So, sshd try to find reverse DNS record for a while before prompting you password.

If you do not want to wait,  you can either add your client’s ip and hostname information to /etc/hosts file on linux or you can disable reverse dns lookup in /etc/ssh/sshd_config

1- Open your terminal window

2- Edit /etc/ssh/sshd_config

3- Add UseDNS no at the end

4- Restart your ssh daemon