LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1280|回复: 3

悲剧啊!winxp宿主机ssh登录不上虚拟机。但是另外一个win虚拟机就能连接上!!

[复制链接]
发表于 2009-11-3 18:59:45 | 显示全部楼层 |阅读模式
RT!

虚拟机是centos5.4。才装的。能够yum安装软件。

从win使用pietty登录上来发现不可以!

但是另一个windows 2003虚拟机就可以登录上来!!


我在虚拟机上运行
ssh localhost
报告:
connect to host localhost port 22 connection refused


以下是连接不上的虚拟机上的诊断:

ps -ef|grep ssh
返回
root      2555     1  0 18:28 ?        00:00:00 /usr/sbin/sshd
root      2647  2555  0 18:36 ?        00:00:00 sshd: root@pts/0
root      2670  2555  0 18:47 ?        00:00:00 sshd: root@pts/1
root      2742  2672  0 19:03 pts/1    00:00:00 grep ssh



ssh localhost
返回
ssh: connect to host localhost port 22: Connection refused

netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 192.168.1.54:22             0.0.0.0:*                   LISTEN      2555/sshd
 楼主| 发表于 2009-11-5 23:52:39 | 显示全部楼层
杯具啊!!!!
回复 支持 反对

使用道具 举报

发表于 2009-11-9 13:48:06 | 显示全部楼层
从win使用pietty登录上来发现不可以!
但是另一个windows 2003虚拟机就可以登录上来!!

我在虚拟机上运行
ssh localhost
报告:
connect to host localhost port 22 connection refused

tcp        0      0 192.168.1.54:22             0.0.0.0:*                   LISTEN      2555/sshd

1. host端不能登录,很可能是宿主跟虚拟机之间的网络配置问题
2. ssh localhost不能登录这个问题很明确,是sshd_config文件配置问题,看你的netstat输出,只开了192.168.1.54端,在配置里打开0.0.0.0端也就是localhost端就可以
回复 支持 反对

使用道具 举报

发表于 2009-11-12 12:57:41 | 显示全部楼层
http://www.linuxsir.cn/bbs/thread356894.html

参考下看对你有没有帮助?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表