CentOS 5.5 与 Xen 奇怪的连接问题

CentOS 5.5 与 Xen 奇怪的连接问题

我的 CentOS 5.5 服务器遇到了一个奇怪的问题。我将此服务器用作带有 2 个 Xen 客户机的 Xen 主机。

问题是我无法使用 SSH 或 VNC 连接到服务器。SSH 和 VNC 连接尝试都会导致“对等方重置连接”错误。我可以向您保证,没有防火墙可能会阻止连接。我尝试通过在调试模式下启动 SSHD 来调试它。以下是输出 -

[root@xen ~]# /usr/sbin/sshd -d -p 22
debug1: sshd version OpenSSH_5.5p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-p'
debug1: rexec_argv[3]='22'
Set /proc/self/oom_adj from 0 to -17
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from xxx.xxx.xxx.xxx port 6792
Did not receive identification string from xxx.xxx.xxx.xxx

在客户端(Ubuntu 10.10)-

superman@my-pc:~$ ssh -vv [email protected]
OpenSSH_5.5p1 Debian-4ubuntu5, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server.host.name [server.host.name] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /home/superman/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/superman/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/superman/.ssh/id_rsa-cert type -1
debug1: identity file /home/superman/.ssh/id_dsa type -1
debug1: identity file /home/superman/.ssh/id_dsa-cert type -1

我也无法从 xen 服务器通过 SSH 连接到任何其他服务器。

[root@xen ~]# ssh my.other.server.ip
ssh_exchange_identification: read: Connection reset by peer

可能出了什么问题?我可以通过 KVM 访问此服务器,并尝试完全删除所有 openssh 包并重新安装它们。

更新 1

按照 slashdot 的建议,我尝试在关闭公钥身份验证的情况下进行连接,结果相同 -

superman@my-pc:~$ ssh -vvv -o PubkeyAuthentication=no server.host.name
OpenSSH_5.5p1 Debian-4ubuntu5, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server.host.name [ser.ver.ip.add] port 22.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/superman/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/superman/.ssh/id_rsa-cert type -1
debug1: identity file /home/superman/.ssh/id_dsa type -1
debug1: identity file /home/superman/.ssh/id_dsa-cert type -1

如果您需要任何其他信息,请告诉我。

感谢您的时间。

更新 2 -

我接到数据中心的电话,说路由器出了问题,导致了这个问题。这个问题现在已经解决了。

再次感谢社区的努力。

答案1

您可以检查 /etc/libvirt 目录的权限并发布其权限吗?我在这里看到有人遇到过类似的问题http://www.mail-archive.com/[电子邮件保护]/msg05019.html

摘自上述链接

当没有这个时,我惊讶地发现,在复制
相应的 XML 文件后,到虚拟机的 ssh 连接断开了。当我写下这个时,确认备份存在权限问题。

答案2

还可以考虑尝试不使用 PubkeyAuthntication,以确保没有密钥交换问题,即:

ssh -o PubkeyAuthentication=no 你的主机IP

相关内容