gpt4 book ai didi

windows - Vagrant Windows - ssh_exchange_identification : read: Connection reset by peer

转载 作者:可可西里 更新时间:2023-11-01 12:39:22 25 4
gpt4 key购买 nike

看来我无法通过 SSH 连接到我的虚拟机。

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

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

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

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 Manager 检查)

执行以下命令:

vagrant ssh

命令显示:

ssh_exchange_identification: read: Connection reset by peer  

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

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,它运行良好。

最佳答案

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

vagrant reload

vagrant ssh

再次运行正常

关于windows - Vagrant Windows - ssh_exchange_identification : read: Connection reset by peer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38327066/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com