Vagrant Windows - ssh_exchange_identification:读取:对等方重置连接 [英] Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer

查看:42
本文介绍了Vagrant Windows - ssh_exchange_identification:读取:对等方重置连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法通过 SSH 连接到我的虚拟机.

It seems I can't SSH to my virtual box.

我有一个运行 Win7 的虚拟机.主机PC也是Win7.虚拟框是通过 Vagrant 使用以下 Vagrantfile 创建的.

I have a virtual box running with Win7. The host PC is also in Win7. The virtual box was created through Vagrant with the following Vagrantfile.

Vagrant.configure("2") do |config|  
    config.vm.box = "http://aka.ms/vagrant-win7-ie11"  
end

打开cmd.转到 VagrantFile 的根文件夹.执行以下命令:

Open cmd. Go to the root folder of the VagrantFile. Execute the following command:

vagrant up

cmd 显示:

Bringing machine 'default' up with 'virtualbox' provider...  
==> default: Clearing any previously set forwarded ports...  
==> default: Clearing any previously set network interfaces...  
==> default: Preparing network interfaces based on configuration...  
    default: Adapter 1: nat  
==> default: Forwarding ports...  
    default: 22 (guest) => 2222 (host) (adapter 1)  
==> default: Booting VM...  
==> default: Waiting for machine to boot. This may take a few minutes...  
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant  
    default: SSH auth method: private key

Timed out while waiting for the machine to boot...

虽然虚拟机已经完成启动,但出现超时.(通过 VirtualBox 管理器检查)

Time out appears though the virtual box has already finished the boot. (Checking via VirtualBox Manager)

执行以下命令:

vagrant ssh

cmd 显示:

ssh_exchange_identification: read: Connection reset by peer  

在调试 vagrant ssh 时,我可能发现了一些有用的日志:

While debugging the vagrant ssh, I may have found some useful logs:

INFO subprocess: Starting process: ["C:\\Program Files\\Git\\usr\\bin/ssh.EXE"]

INFO ssh: Invoking SSH: ss ["vagrant@127.0.0.1", "-p", "2222", "-o", "Compression=yes", "-o", "DSAAuthentication=yes", "-o", "LogLevel=FATAL", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-o", "IdentitiesOnly=yes", "-i", "C:/Users/hostpcname/.vagrant.d/insecure_private_key"]  

你能建议一些如何摆脱这种情况的方法吗?我尝试过非 Windows 映像 - hashicorp/precise64,效果很好.

Can you suggest some ways on how to get out of this? I've tried the non-Windows image - hashicorp/precise64, and it worked fine.

推荐答案

我有同样的问题.请按照此步骤操作并为我工作.

I have the same issue. Do by follow this step and working for me.

流浪者重新加载

流浪 ssh

再次并且工作正常

这篇关于Vagrant Windows - ssh_exchange_identification:读取:对等方重置连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆