配置ssh时发现有两个参数GSSAPIAuthentication GSSAPICleanupCredentials,查了查,总结如下

ssh 登录系统慢可能是ssh-server端设置了UseDNS yes,当DNS有问题时,导致登录过程缓慢。
另一个导致 ssh 登录慢的原因,仍然是因为DNS解析的问题。

系统默认情况下 sshd_config的配置里,GSSAPIAuthentication选项是 no ,系统自动升级变成了 yes,并且在 ssh_config 里也添加了此选项,于是登录过程中便多了 GSSAPIAuthentication 的尝试。

ssh登录的时候出现如下信息:

Address 192.168.20.24 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

修改本地中的/etc/ssh/ssh_config,把参数改为GSSAPIAuthentication no

或者修改远程服务器端的/etc/ssh/sshd_config ,把参数改为GSSAPIAuthentication no

vi /etc/ssh/sshd_config

按照下面两项修改

GSSAPIAuthentication no

UseDNS no

如果访问仍然慢,请检查/etc/resolv.conf文件中的DNS服务器是否可访问?