SSH issue: Slow connection

Situation 1

While I connecting to my server (Debian) via SSH, I have to wait at least 30 seconds to input password.

DNS resolution failed leads to the problem.

sudo /etc/ssh/sshd_config

Add or Modify this line

UseDNS no

It works in most situations.

Situation 2

If it doesn’t work, use debug mode “ssh -v [email protected]” to get debug info, and check where you are choked on. If connection process stop at this line

debug1: Next authentication method: gssapi-with-mic

Add or modify this line

GSSAPIAuthentication no

标签: none