Http://xiaobin.net/201112/ssh-login-quite-slow/
There are two possible problems:
The first case is more common, and there are many materials mentioned that during SSH Login, the server will reverse parse the client's IP address, resulting in slow login response, generally, you can change "usedns no" of sshd_config.
In the second case, gssapi [1] is enabled on the server. During login, the client needs to reverse parse the IP address of the server. If the IP address of the server is not configured with PTR records, it is easy to get stuck here.
In this case, it is necessary to disable gssapi authentication to accelerate SSH Login. The following methods are available:
- Solution 1: use the additional parameter ssh-O gssapiauthentication = No server_address when using the SSH command
- Solution 2: Modify the client ssh_config (/etc/ssh/ssh_config or ~ /. Ssh/config): gssapiauthentication No
- Solution 3: Modify sshd_config (/etc/ssh/ssd_config) on the server: gssapiauthentication No
Refer:
- [1]-gssapi
- Disable SSH gssapi to speed up connection
Slow SSH Login response