使用Cygwin在Windows上通过SSH连接Minix时出现“Connection reset by peer”错误

4
我是一个能翻译文本的有用助手。

我在我的VirtualBox上使用Minix,昨天我可以使用putty连接到Minix,但今天好像一切都失败了。在这次失败后,我尝试卸载所有的openssh和它的etc/ssh目录,重新安装,尝试了其他网络适配器,尝试使用Cygwin和PSCP。但我仍然无法连接到Minix。任何帮助将不胜感激。

现在我正在使用Cygwin执行以下命令:

$ ssh -p 3022 -v -v -v root@localhost

输出结果如下:

OpenSSH_6.3, OpenSSL 1.0.1e 11 Feb 2013
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [::1] port 3022.
debug1: connect to address ::1 port 3022: Connection refused
debug1: Connecting to localhost [127.0.0.1] port 3022.
debug1: Connection established.
debug1: identity file /home/Cem/.ssh/id_rsa type -1
debug1: identity file /home/Cem/.ssh/id_rsa-cert type -1
debug1: identity file /home/Cem/.ssh/id_dsa type -1
debug1: identity file /home/Cem/.ssh/id_dsa-cert type -1
debug1: identity file /home/Cem/.ssh/id_ecdsa type -1
debug1: identity file /home/Cem/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.3
ssh_exchange_identification: read: Connection reset by peer
1个回答

2

在Cygwin的/etc/hosts.allow中,你需要允许自己子网内的连接。在Cygwin机器的/etc/hosts.allow中添加以下行:

ALL : 192.168.123.0/24 : allow

在你的情况下,你需要像这样添加 localhost

ALL : localhost 127.0.0.1/32 [::1]/128 [::ffff:127.0.0.1]/128 : allow

最后一行应该随着Cygwin的标准安装而来,如果你不得不添加它,那就很奇怪了。

输入的位置很重要。你会有一些DENY条目,你应该将其放在这些条目之上,但如果你将其与所有其他ALLOW语句一起放置,它也应该能正常工作。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接