Password prompt delay using SSH

I find on new installs of Linux there is a delay of about 20 seconds when using SSH to connect to the new install. I have found different suggestions for the fix and tehse are my experiences:

This article (https://rbgeek.wordpress.com/2012/05/25/how-to-fix-delay-in-ssh-login/) suggests setting ‘UseDNS’ to no on the new ssh server (in sshd_config, then restart sshd), but I have not found this to work.

To further diagnose, you can use ‘-vvv’ on the ssh client to see where the delay is. In my most recent test, the following message appeared several times (with a delay between each), which accounts for the overall delay:

 debug1: Unspecified GSS failure. Minor code may provide more information
 Cannot determine realm for numeric host address

Based on that, the proper fix for me was to set the following in sshd_config:

 GSSAPIAuthentication no

Hope this helps others!

Comments are closed.