SSH login is supposed to be fast – All it needs are a key exchange to establish a secure channel and then an authentication process, which are both trivial tasks to modern computers. However, as it often happens, a simple login might take no less than 15 seconds.
I ran into this problem recently and had a investigation. As it turned out, there are multitude of factors that might affect the speed of the SSH login process. From the most obvious the to most inconspicuous, here are them:
- The sshd_config file.
This is the main configuration file that controls the behavior of the ssh daemon. In this file, you want to make sure the following features are disabled: