2014-10-08 39 views
5

我想連接到使用vagrant ssh命令的宅基地,但我得到下面的錯誤消息。我正在使用Windows 7.我如何解決這個問題?ssh_exchange_identification讀取連接重置由對端 - Homestead Laravel

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. 
+0

請問您可以從ssh客戶端和服務器端發佈日誌嗎? – 2014-10-08 09:28:11

回答

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去設備/網絡/連接網絡適配器並連接它,在我的安裝它默認斷開連接,並導致問題與SSH和規定。

+0

你能解釋一下這個代碼在哪裏嗎?而且沒有辦法從終端做到這一點? (我可以用VirtualBox來到那裏) – Niels 2017-01-17 14:16:52

+1

@Niels你好,祝你有個美好的一天:)。 這段代碼出現在使用以下命令後生成的_Vagrantfile_中:** $ php vendor/bin/homestead make **。 我不確定它是否可以從控制檯做到這一點,我做了類似VBoxManage的命令https://www.virtualbox.org/manual/ch08.html你可以從那裏看。 這裏的基本問題是,宅基地的流浪者機器已經壞了,我想也許這應該是一個報告的錯誤。 對不起,我花了這麼長時間回答感謝您的時間:)。 – civilian 2017-01-20 21:21:54

0

可能是因爲多次登錄SSH失敗後,您的IP被阻止。致電您的託管服務,讓他們解除您的IP /刪除限制。

相關問題