【问题标题】:ssh_exchange_identification read connection reset by peer - Homestead Laravelssh_exchange_identification 读取连接被对等点重置 - Homestead Laravel
【发布时间】:2014-10-08 01:30:11
【问题描述】:

我正在尝试使用 vagrant ssh 命令连接到 Homestead,但收到以下错误消息。我使用的是 Windows 7。如何解决此问题?

ssh_exchange_identification 读取连接被对端重置

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos-64-x64-vbox4210'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: rafael_default_1396403974194_51967
==> 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 => 2222 (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
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
default: Error: Connection timeout. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

【问题讨论】:

  • 能否请您从 ssh 客户端和服务器端发布日志?

标签: ssh laravel-4 ssh-keys


【解决方案1】:

对于其他遇到此问题的人,请尝试使用虚拟机的 gui:

Vagrant.configure(2) do |config|
.... # your other stuff from vagrant here
    config.vm.provider "virtualbox" do |vb|
        vb.gui = true
    end
end

然后使用 gui 转到 Devices/Network/Connect Network Adapter 并连接它,在我的安装中,它默认断开连接并导致 ssh 和配置出现问题。

【讨论】:

  • 你能解释一下把这段代码放在哪里吗?有没有办法从终端做到这一点? (我可以通过 VirtualBox 到达那里)
  • @Niels 你好,祝你有美好的一天:)。这段代码在您使用命令后生成的 Vagrantfile 中:$ php vendor/bin/homestead make。我不确定是否可以从控制台执行此操作,我使用 VBoxManage virtualbox.org/manual/ch08.html 的命令做了类似的事情,您可以从那里查看。这里的基本问题是宅基地流浪机器建造得很糟糕,我认为这可能应该是一个报告的错误。对不起,我花了这么长时间才回答谢谢你的时间:)。
【解决方案2】:

可能是您的 IP 在多次尝试登录 SSH 失败后被阻止。致电您的托管服务并让他们取消阻止您的 IP/删除限制。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-15
    • 1970-01-01
    • 2018-11-01
    • 1970-01-01
    相关资源
    最近更新 更多