【问题标题】:Vagrant Windows - ssh_exchange_identification: read: Connection reset by peerVagrant Windows - ssh_exchange_identification:读取:对等方重置连接
【发布时间】:2020-07-16 13:46:46
【问题描述】:

我似乎无法通过 SSH 连接到我的虚拟盒子。

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

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

打开cmd。转到 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

cmd 显示:

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 映像 - hashcorp/precise64,效果很好。

【问题讨论】:

  • 同样的错误。你找到解决办法了吗?

标签: windows ssh vagrant virtualbox


【解决方案1】:

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

流浪重装

流浪的ssh

再次正常工作

【讨论】:

  • 这只是一个临时解决方案,问题又来了。这不能解决任何问题..
  • 我也面临同样的问题。但是这个并没有解决我的问题。
【解决方案2】:

这些步骤将起作用

  1. 流浪汉

  2. 打开虚拟框并取消选中硬件虚拟化,保存

  3. 流浪

  4. 流浪的ssh

注意:vagrant halt 是必须的,运行状态下不能修改设置

【讨论】:

  • 如何让vagrant机器显示在virtualbox中?
【解决方案3】:

以下命令对我有用。

vagrant halt
vagrant up
vagrant ssh

【讨论】:

    【解决方案4】:

    在 BIOS 上启用虚拟化

    【讨论】:

    【解决方案5】:

    重启我的电脑并在 BIOS 中启用英特尔虚拟化后,我能够克服这个问题。

    【讨论】:

      【解决方案6】:

      我收到错误消息:ssh_exchange_identification connection reset by peer 请点击下面的链接,它对我有用。 https://talk.openmrs.org/t/error-on-vagrant-up/8833/30

      步骤:

      请打开 virtualbox 并检查是否有任何 vm 正在运行。

      运行 vagrant destroy 删除当前 Vagrantfile 创建的所有虚拟机。 删除 bahmni-vagrant 目录中的 .vagrant 目录。 确保您拥有与 https://github.com/Bahmni/bahmni-vagrant/blob/master/Vagrantfile 37 相同的 Vagrantfile 文件。 跑流浪汉。在启动时监控 virtualbox。

      【讨论】:

      • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接答案可能会失效。 how to answer.
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-14
      • 1970-01-01
      • 1970-01-01
      • 2015-05-15
      • 1970-01-01
      • 2018-11-01
      相关资源
      最近更新 更多