免费注册 查看新帖 |

Chinaunix

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

(已解决)另一个ssh单向正常,另外一个方向不正常的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-24 09:44 |只看该作者 |倒序浏览
本帖最后由 boylez 于 2011-11-24 10:44 编辑

从1号机ssh到3号机正常
从3号机ssh到1号机异常!

也没说连接失败,就是一直还是在3号机上,没出去
[dbrg@CentOS-hdp3 ~]$
[dbrg@CentOS-hdp3 ~]$ ssh CentOS-hdp1
Last login: Thu Nov 24 09:37:17 2011
[dbrg@CentOS-hdp3 ~]$
[dbrg@CentOS-hdp3 ~]$ hostname
CentOS-hdp3.hdp
[dbrg@CentOS-hdp3 ~]$ exit
logout
Connection to CentOS-hdp1 closed.
[dbrg@CentOS-hdp3 ~]$


====================================
正常:
[dbrg@CentOS-hdp1 /]$ssh CentOS-hdp3
Last login: Thu Nov 24 09:37:29 2011 from centos-hdp1.hdp
[dbrg@CentOS-hdp3 ~]$ hostname
CentOS-hdp3.hdp
[dbrg@CentOS-hdp3 ~]$ exit
logout
Connection to CentOS-hdp3 closed.
[dbrg@CentOS-hdp1 /]$

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
2 [报告]
发表于 2011-11-24 09:50 |只看该作者
把ssh的dns禁用一下试试
http://bbs.chinaunix.net/thread-1689869-1-1.html

论坛徽章:
0
3 [报告]
发表于 2011-11-24 09:58 |只看该作者
不行,只增加了127.0.0.1的ip地址
Last login: Thu Nov 24 09:57:35 2011 from 127.0.0.1
还是显示3号机

论坛徽章:
0
4 [报告]
发表于 2011-11-24 10:29 |只看该作者
[dbrg@CentOS-hdp3 ~]$
[dbrg@CentOS-hdp3 ~]$ hostname
CentOS-hdp3.hdp
[dbrg@CentOS-hdp3 ~]$ ssh -v CentOS-hdp1
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to CentOS-hdp1 [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/dbrg/.ssh/identity type -1
debug1: identity file /home/dbrg/.ssh/id_rsa type 1
debug1: identity file /home/dbrg/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr 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 'centos-hdp1' is known and matches the RSA host key.
debug1: Found key in /home/dbrg/.ssh/known_hosts:1
debug1: ssh_rsa_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,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_501' not found

debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_501' not found

debug1: Unspecified GSS failure.  Minor code may provide more information


debug1: Next authentication method: publickey
debug1: Trying private key: /home/dbrg/.ssh/identity
debug1: Offering public key: /home/dbrg/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.UTF-8
Last login: Thu Nov 24 10:27:25 2011 from 192.168.233.11
[dbrg@CentOS-hdp3 ~]$ hostname
CentOS-hdp3.hdp
[dbrg@CentOS-hdp3 ~]$ exitdebug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0

logout
debug1: channel 0: free: client-session, nchannels 1
Connection to CentOS-hdp1 closed.
Transferred: sent 3040, received 2936 bytes, in 22.6 seconds
Bytes per second: sent 134.6, received 130.0
debug1: Exit status 0
[dbrg@CentOS-hdp3 ~]$

论坛徽章:
0
5 [报告]
发表于 2011-11-24 10:43 |只看该作者
搞定了,是我自己的问题,也是自己解决的

debug1: Connecting to CentOS-hdp1 [127.0.0.1] port 22.

3号机的hosts文件问题,谢谢各位

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
6 [报告]
发表于 2011-11-24 10:54 |只看该作者
回复 5# boylez


半个小时之前还在说hosts文件没问题
http://bbs.chinaunix.net/thread-3622250-1-1.html

论坛徽章:
0
7 [报告]
发表于 2011-11-24 10:59 |只看该作者
老兄,我不是故意地
1/2号机没问题
3号机的问题,3号机是我把1号机克隆的
anyway, 感谢!
回复  boylez


半个小时之前还在说hosts文件没问题
Shell_HAT 发表于 2011-11-24 10:54

论坛徽章:
0
8 [报告]
发表于 2019-02-18 20:10 |只看该作者
所以hosts文件里是什么问题呢?  可否展示一下

论坛徽章:
0
9 [报告]
发表于 2019-03-11 16:18 |只看该作者
回复 8# 妈妈说名字长才霸气我就是试试

克隆的1号机器, hostname 解析是按照1号机器本地 127.0.0.1解析的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP