免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1466 | 回复: 7
打印 上一主题 下一主题

[系统管理] ssh登陆慢的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-10-12 11:08 |只看该作者 |倒序浏览
两台虚拟机,一台redhat,一台Debian ,从 redhat登陆到Debian(192.168.110.114)
  1. [root@compute3 ~]# cat /etc/redhat-release
  2. Red Hat Enterprise Linux Server release 7.1 (Maipo)
复制代码
  1. vyatta@vyatta:~$ cat /proc/version
  2. Linux version 3.10.83-1-amd64-vyatta (abuild@build-worker3) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Wed Jul 8 03:22:17 UTC 2015
复制代码
我 试过网上集中常见的对策,都没有用,包括修改 /etc/hosts;UseDNS 的缺省值由yes修改为no;GSSAPIAuthentication设置成no

把以上的修改都做了,现在卡在 debug1: Local version string SSH-2.0-OpenSSH_6.6.1 和 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze5 之间了,
就是显示完Local version string SSH-2.0-OpenSSH_6.6.1要等好几秒才显示debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze5

整个ssh过程大约要个好几秒才能出现输入密码的提示。
其他的从各个版本的redhat和各个版本的centos互相ssh登陆都是秒开,唯独这两个虚拟机,难道是Debian系的和redhat之间的问题?搞不明白问题出在哪里了
  1. [root@compute3 ~]# ssh vyatta@192.168.110.114 -v
  2. OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
  3. debug1: Reading configuration data /etc/ssh/ssh_config
  4. debug1: /etc/ssh/ssh_config line 56: Applying options for *
  5. debug1: Connecting to 192.168.110.114 [192.168.110.114] port 22.
  6. debug1: Connection established.
  7. debug1: permanently_set_uid: 0/0
  8. debug1: identity file /root/.ssh/id_rsa type -1
  9. debug1: identity file /root/.ssh/id_rsa-cert type -1
  10. debug1: identity file /root/.ssh/id_dsa type -1
  11. debug1: identity file /root/.ssh/id_dsa-cert type -1
  12. debug1: identity file /root/.ssh/id_ecdsa type -1
  13. debug1: identity file /root/.ssh/id_ecdsa-cert type -1
  14. debug1: identity file /root/.ssh/id_ed25519 type -1
  15. debug1: identity file /root/.ssh/id_ed25519-cert type -1
  16. debug1: Enabling compatibility mode for protocol 2.0
  17. debug1: Local version string SSH-2.0-OpenSSH_6.6.1
  18. debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze5
  19. debug1: match: OpenSSH_5.5p1 Debian-6+squeeze5 pat OpenSSH_5* compat 0x0c000000
  20. debug1: SSH2_MSG_KEXINIT sent
  21. debug1: SSH2_MSG_KEXINIT received
  22. debug1: kex: server->client aes128-ctr hmac-md5 none
  23. debug1: kex: client->server aes128-ctr hmac-md5 none
  24. debug1: kex: diffie-hellman-group-exchange-sha256 need=16 dh_need=16
  25. debug1: kex: diffie-hellman-group-exchange-sha256 need=16 dh_need=16
  26. debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
  27. debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
  28. debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
  29. debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
  30. debug1: Server host key: RSA 4c:04:55:7a:ab:86:a3:3f:1e:3f:1a:81:10:49:ed:11
  31. debug1: Host '192.168.110.114' is known and matches the RSA host key.
  32. debug1: Found key in /root/.ssh/known_hosts:30
  33. debug1: ssh_rsa_verify: signature correct
  34. debug1: SSH2_MSG_NEWKEYS sent
  35. debug1: expecting SSH2_MSG_NEWKEYS
  36. debug1: SSH2_MSG_NEWKEYS received
  37. debug1: Roaming not allowed by server
  38. debug1: SSH2_MSG_SERVICE_REQUEST sent
  39. debug1: SSH2_MSG_SERVICE_ACCEPT received
  40. Welcome to Vyatta
  41. debug1: Authentications that can continue: publickey,password
  42. debug1: Next authentication method: publickey
  43. debug1: Trying private key: /root/.ssh/id_rsa
  44. debug1: Trying private key: /root/.ssh/id_dsa
  45. debug1: Trying private key: /root/.ssh/id_ecdsa
  46. debug1: Trying private key: /root/.ssh/id_ed25519
  47. debug1: Next authentication method: password
  48. vyatta@192.168.110.114's password:
复制代码

论坛徽章:
45
2016猴年福章徽章
日期:2016-02-18 16:42:24平安夜徽章
日期:2015-12-27 09:46:0315-16赛季CBA联赛之八一
日期:2015-12-15 17:08:23黄金圣斗士
日期:2015-12-11 09:16:31天蝎座
日期:2015-12-11 09:16:22戌狗
日期:2015-12-11 09:16:19程序设计版块每周发帖之星
日期:2015-12-11 09:15:21操作系统版块每周发帖之星
日期:2015-12-11 09:15:16IT运维版块每周发帖之星
日期:2015-12-11 09:15:09IT运维版块每月发帖之星
日期:2015-12-11 09:15:01CU十四周年纪念徽章
日期:2015-12-11 09:14:40操作系统版块每日发帖之星
日期:2015-12-11 09:13:36
2 [报告]
发表于 2015-10-12 11:24 |只看该作者
1.远程登录使用root用户试试
2.统一两台服务器openssh版本试试

论坛徽章:
0
3 [报告]
发表于 2015-10-12 11:36 |只看该作者
不错的啊。。

求职 : Linux运维
论坛徽章:
203
拜羊年徽章
日期:2015-03-03 16:15:432015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:57:092015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之约旦
日期:2015-04-05 20:08:292015年亚洲杯之澳大利亚
日期:2015-04-09 09:25:552015年亚洲杯之约旦
日期:2015-04-10 17:34:102015年亚洲杯之巴勒斯坦
日期:2015-04-10 17:35:342015年亚洲杯之日本
日期:2015-04-16 16:28:552015年亚洲杯纪念徽章
日期:2015-04-27 23:29:17操作系统版块每日发帖之星
日期:2015-06-06 22:20:00操作系统版块每日发帖之星
日期:2015-06-09 22:20:00
4 [报告]
发表于 2015-10-12 21:44 |只看该作者
试试 ssh -l root  192.168.1.2

论坛徽章:
0
5 [报告]
发表于 2015-10-16 08:51 |只看该作者
没法子
去 mirror.vyos.net/iso/release/1.1.6
重下了个镜像,openstack生成实例后,重新配网络,一切ok,ssh秒开了
对比新旧虚拟机的ssh -v log,一模一样

左边是新的ssh秒开,右边会卡个几秒

不知道原因,感觉靠ssh -v的信息也查不出来是具体原因

论坛徽章:
1
操作系统版块每日发帖之星
日期:2016-02-18 06:20:00
6 [报告]
发表于 2015-10-20 10:45 |只看该作者
看看DNS设置文件 /etc/resolve.conf

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
7 [报告]
发表于 2015-10-26 09:24 |只看该作者
本帖最后由 chenyx 于 2015-10-26 09:25 编辑

修改服务器的sshd_config,将UseDNS修改为no,然后重启ssh服务看看

论坛徽章:
0
8 [报告]
发表于 2015-10-26 23:01 |只看该作者
回复 7# chenyx


   不行啊,这招试过了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP