返回列表 发帖

ssh 域名解析登录延迟问题

#time ssh
real    0m19.928s
user    0m0.008s
sys     0m0.001s
可以看到登录这个点服务器需要近20秒的时间;
然后用nslookup检查了这个域名ip地址:
报了;; connection timed out; no servers could be reached的错误;
用ping是可以解析,不过解析时间也很长;
这个问题的原因,目前还不是很清楚,怀疑是否是新启用的ip地址可能存在这方面的情况;

ssh登录缓慢的问题可以通过修改sshd_config文件中的GSSAPI options

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
全部注释掉,然后重启sshd服务;
再测试登录

#time ssh
real    0m2.229s
user    0m0.006s
sys     0m0.002s
恢复正常!

返回列表