Generally speaking, even the password prompt should not take a lot of time (more than a few seconds) to pop up during the initial connection state. However, leaving parts of the SSH daemon unconfigured can lead to communication mismatch and timeout troubles under the hood – luckily, two lines of configuration editing will solve this issues for us.
Please note: I’m assuming that you are not using GSSAPI authentication (by default if you do not know what it is, then it is safe to assume that you are not using it – more on that on this Wiki page).
The other function we are going to disable is the Reverse DNS lookup function which only serves as an added logging feature.
Under Ubuntu, the default config file for sshd is located here:
So, editing the GSSAPI line lines like this:
And adding (if it not exist) this:
We should be logging in as swiftly as ever!