2
votes

I cannot access my Laravel Homestead box. When I run vagrant up it eventually fails with this message:

SSH auth method: private key Timed out while waiting for the machine to boot {... more}

In the VirtualBox UI I can see that the machine is running. I can not access it with vagrant ssh though. It attempts for a while, then simply returns to the host terminal prompt without any error message. When I press 'show' in the VirtualBox UI, it takes me to an unfamiliar prompt, initramfs.

I am not sure why this happened. The Linux host was setup only a few months ago with the latest Ubuntu distro, and I have been using Homestead almost every day. Yesterday I was unable to connect to Bitbucket (over SSH), for some strange reason. Maybe the two are related?

Based on this thread, https://laracasts.com/discuss/channels/laravel/homestead-hangs-at-ssh-auth-method-private-key?page=1, I think I should try changing the SSH keys, but how do I do that? I was not really clear on how the keys worked in the first place. (Do I need to share the host's public key with the guest? Or the other way around perhaps?)

Secondly, I don't see how I can change the keys if I can't access the host.

EDIT:

Here are some things I tried on the host:

  • Generated a new pair of keys called "homestead". Updated the authorize key of the Homestead.yaml file. Also tried adding the new public key under the 'keys' section of Homestead.yaml
  • Emptied the known_hosts file
  • Removed the private_key file from under the Homestead/.vagrant/.../.... folder
  • ssh vagrant@localhost -p 2222 (it asks for password, but fails to auth)

None of this changed the result.

1

1 Answers

0
votes

Regenerate Keys by this command:

ssh-keygen -t rsa -C "you@homestead"