Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1697402
  • 博文数量: 163
  • 博客积分: 10591
  • 博客等级: 上将
  • 技术积分: 1980
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-08 18:17
文章分类

全部博文(163)

文章存档

2018年(1)

2012年(1)

2011年(47)

2010年(58)

2009年(21)

2008年(35)

分类: LINUX

2010-04-26 09:49:38

linux ssh连接慢
 
最近发现ssh连接的时候却很慢,ping的速度非常好,让人误以为是ssh连接不上。
分析结果,主要原因为:DNS的解析IP导致,可分别使用以下几种分析处理方式
1、在server上/etc/hosts文件中把你本机的ip和hostname加入 
2、在server上/etc/ssh/sshd_config文件中修改或加入UseDNS=no 
3、注释掉server上/etc/resolv.conf中不使用的IP所有行 
4、修改server上/etc/nsswitch.conf中hosts为hosts:files
5、authentication gssapi-with-mic也有可能出现问题,在server上/etc/ssh/sshd_config文件中修改GSSAPIAuthentication no。/etc/init.d/sshd restart重启sshd进程使配置生效。
如之前为服务器配置了双网卡,使的在/etc/resolv.conf文件中多了一行目前不使用的IP地址。注释或者删除该行即可。
阅读(4571) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~