Laravel Homestead hangs at SSH auth method: private key on mac

你。 提交于 2019-11-29 20:28:06

I had the same problem on macOS 10.12 today, and lost 6 hours trying to find a fix. Finally, after several reinstallations, reboots, and trial and error, I somehow got it to work by following these steps...

  1. Completely uninstall and reinstall Vagrant, VirtualBox, and Homestead.
  2. Ensure the homestead-7 box is shut down within the VirtualBox UI
  3. Right-click the homestead-7 box, and choose Settings
  4. Click 'Network'
  5. Under 'Adapter 1', which should be attached to NAT, click 'Advanced'
  6. Tick the box beside 'Cable Connected'
  7. Save settings, and reprovision Homestead with vagrant up --provision
  8. Run vagrant reload --provision to reprovision the machine

That should be it! I was able to SSH in after this, but not able to view Homestead sites through the browser (even though I'd configured the /etc/hosts file), but a simple reboot of the Mac seemed to fix this.

Given I don't know what exactly caused this in the first place, this might just be a bit of luck for my case, but let me know how you get on.

I had this problem. I enabled Vt-x in the bios and it cleared it.

Enable "Virtualization Technology" in BIOS settings

Vagrant 2.1.2

vagrant destroy then vagrant up --provision worked for me.

I have noticed that it usually happens when new version of vagrant released

Nothing here worked for me. I got into the situation of SSH auth method: private key because my mac black screened and crashed.

All that worked for me was a vagrant destroy then vagrant up --provision. Beware this will of course trash anything in your VM. but you should be using ephemeral principles anyway...

  1. Open VirtualBox UI and enter the virtual machine.
  2. press Enter key to make system continue to boot.

And then you can see the vagrant up going on.

I had to do a fsck. (disclaimer, I typed the commands from memory)

  1. Open VirtualBox UI and enter the virtual machine.
  2. If you see (initramfs), type exit
  3. fsck /dev/mapper/vagrant-vg-root -y
  4. reboot

Go back to your normal terminal and try a:

vagrant halt
vagrant up

For me, things were back to normal from here.

If you are on Windows, you have done everything here and still have trouble, maybe this is the solution you need.

Open the Command Prompt as an administrator. Type the bcdedit command. You may find hypervisorlaunchtype Auto. If that is the case, type bcdedit /set hypervisorlaunchtype off to turn it off. Reboot and try again.

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!