最近在工作中常常用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
恢复正常!
#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
恢复正常!
作者:jackx@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://www.jackxiang.com/post/2400/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表