免费注册 查看新帖 |

Chinaunix

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

ssh登录变得异常慢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-01-19 15:15 |只看该作者 |倒序浏览
本帖最后由 adastudy 于 2011-01-25 17:05 编辑

root@tt:/etc/ssh# ssh -v -p 10022 admin@88.82.31.3
OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.7e-p1 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 88.82.31.3 [88.82.31.3] port 10022.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.2p1 FreeBSD-20090522
debug1: match: OpenSSH_5.2p1 FreeBSD-20090522 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.5p1 FreeBSD-20061110
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '[88.82.31.3]:10022' is known and matches the DSA host key.
debug1: Found key in /root/.ssh/known_hosts:84
debug1: ssh_dss_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received



debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Offering public key: /root/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
Last login: Wed Jan 19 15:03:53 2011 from 22.31.38.32


以前一直挺快的,最近突然变慢了,登录方式是公钥

用非公钥登录速度正常。。

上面那些是登录慢的详细信息,其中在红色那条信息等了10余秒..

请帮忙分析一下是什么问题。谢谢

论坛徽章:
0
2 [报告]
发表于 2011-01-19 17:25 |只看该作者
/etc/ssh/sshd_config
UseDNS no

这样呢?

论坛徽章:
0
3 [报告]
发表于 2011-01-19 18:33 |只看该作者
ssh -v 查查
另外看看GSSAPIAuthentication是否是no

论坛徽章:
0
4 [报告]
发表于 2011-01-20 13:56 |只看该作者
/etc/ssh/sshd_config
UseDNS no

这样呢?
3444542 发表于 2011-01-19 17:25



    这个我在发贴前试过,不是这个问题。

论坛徽章:
0
5 [报告]
发表于 2011-01-20 13:56 |只看该作者
ssh -v 查查
另外看看GSSAPIAuthentication是否是no
xiaoshi20cn 发表于 2011-01-19 18:33



    GSSAPIAuthentication我修改过相关配置文件指定为no

登录时把此选项指定为no,速度还是慢

论坛徽章:
0
6 [报告]
发表于 2011-01-21 16:31 |只看该作者
尝试,我也没这么做过
*************
在用户根目录下的 .ssh 目录下创建一个 config 文件. 如, 编辑 /home/cherry/.ssh/config (如果该文件不存在, 则创建之), 添加选项:

GSSAPIAuthentication no

论坛徽章:
2
技术图书徽章
日期:2013-11-23 01:55:57白羊座
日期:2013-12-08 15:48:16
7 [报告]
发表于 2011-01-21 20:17 |只看该作者
编辑被登录机器的 /etc/hosts,将自己的ip以及对应的主机名加进去!

论坛徽章:
0
8 [报告]
发表于 2011-01-25 17:04 |只看该作者
回复 7# 7looki


   这个我也试过,没用。

论坛徽章:
7
丑牛
日期:2013-08-29 14:14:00辰龙
日期:2013-09-06 12:28:56技术图书徽章
日期:2013-09-21 21:33:44狮子座
日期:2014-04-04 16:00:37水瓶座
日期:2014-07-31 21:53:132022北京冬奥会纪念版徽章
日期:2015-08-07 17:10:572015七夕节徽章
日期:2015-08-21 09:20:10
9 [报告]
发表于 2011-01-26 16:13 |只看该作者
我也碰到过慢的情况,不过在resolv.conf里添加了本地DNS或者hosts里添加了本机条目后就好了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP