解決方法:ssh-keygen -t rsa
git
遇到這個問題,折騰很久,終於找到方法能夠解決,記錄一下。github
==> localvm2: Importing base box 'bigdatavm'... ==> localvm2: Matching MAC address for NAT networking... ==> localvm2: Setting the name of the VM: localvm2 ==> localvm2: Fixed port collision for 22 => 2222. Now on port 2200. ==> localvm2: Clearing any previously set network interfaces... ==> localvm2: Preparing network interfaces based on configuration... localvm2: Adapter 1: nat localvm2: Adapter 2: hostonly ==> localvm2: Forwarding ports... localvm2: 22 (guest) => 2200 (host) (adapter 1) ==> localvm2: Running 'pre-boot' VM customizations... ==> localvm2: Booting VM... ==> localvm2: Waiting for machine to boot. This may take a few minutes... localvm2: SSH address: 127.0.0.1:2200 localvm2: SSH username: vagrant localvm2: SSH auth method: private key
一直卡在SSH auth method: private key
而後就是timeout
。ssh
第一步:打開cmd
進入Homestead
目錄,執行vagrant ssh-config
查看IdentityFile
路徑。spa
刪除IdentityFile
目錄下的private_key
文件。命令行
第二步:執行 vagrant up
。不過又會遇到另外一個問題:
截圖不太完整,大概就是圖中內容,一堆的Retrying...
:vagrant
這個時候雖然命令行界面卡住不動了,其實virtualbox 裏的虛擬機已經啓動了。這個時候打開虛擬機,輸入帳戶密碼進入~/.ssh
目錄,執行如下命令:code
#進入.ssh目錄 cd ~/.ssh wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub mv vagrant.pub authorized_keys
執行完成之後。回到cmd
下,執行 vagrant reload --provision
能夠看到從新初始化界面,啓動成功。ip