Homestead hangs at SSH auth method: private key

Published 1 year ago by scott0

I can't seem to get Homestead running. It hangs at SSH auth method: private key.

The Homestead VM starts. I can go to VirtualBox and open the terminal window and login with vagrant:vagrant.

I can't vagrant ssh, ssh [email protected]:2204 or ssh [email protected] -p 2204.

None of my folders show up in the VM, but the VirtualBox says they are mapped.

Every time I vagrant up, I get:

vagrant up Bringing machine 'homestead-7' up with 'virtualbox' provider... ==> homestead-7: Checking if box 'laravel/homestead' is up to date... ==> homestead-7: Clearing any previously set forwarded ports... ==> homestead-7: Fixed port collision for 80 => 8000. Now on port 2200. ==> homestead-7: Fixed port collision for 443 => 44300. Now on port 2201. ==> homestead-7: Fixed port collision for 3306 => 33060. Now on port 2202. ==> homestead-7: Fixed port collision for 5432 => 54320. Now on port 2203. ==> homestead-7: Fixed port collision for 22 => 2222. Now on port 2204. ==> homestead-7: Clearing any previously set network interfaces... ==> homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==> homestead-7: Forwarding ports... homestead-7: 80 (guest) => 2200 (host) (adapter 1) homestead-7: 443 (guest) => 2201 (host) (adapter 1) homestead-7: 3306 (guest) => 2202 (host) (adapter 1) homestead-7: 5432 (guest) => 2203 (host) (adapter 1) homestead-7: 22 (guest) => 2204 (host) (adapter 1) ==> homestead-7: Running 'pre-boot' VM customizations... ==> homestead-7: Booting VM... ==> homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2204 homestead-7: SSH username: vagrant homestead-7: SSH auth method: private key 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.

I replaced the homestead insecure private key with my key on my box. I see a lot of people get Warning: Connection timeout. Retrying..., but I don't get that far.

I'm on a mac 10.11.6

Any help would be greatly appreciated!

clay
clay
1 year ago (82,775 XP)

did you make any progress with this?

ejdelmonico

I replaced the homestead insecure private key with my key on my box. I see a lot of people get Warning: Connection timeout. Retrying..., but I don't get that far.

Homestead is looking for your keys in these line from Homestead.yaml

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

If you are going to change something, make sure they match. Note: these keys are coming from your Mac.

javedgardezi

I am having a similar issue. Homestead stuck at the following after vagrant up.

I am using Mac OS X El Capitan

Vagrant 1.9.0 Virtual Box Version 5.0.30 r112061

Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key

and error I am getting is.

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.

Check my Homestead.yaml file

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

I have tried to look up a lot but no luck.

ejdelmonico

You need to update your VB and I got the same messages upon upgrade to the latest but it works just fine. I am using VB Version 5.1.10 r112026 (Qt5.6.2) and Vagrant 1.9.0 with Homestead 4.0.0

javedgardezi

@ejdelmonico Thank you that worked perfectly.

kelsen
kelsen
1 year ago (1,435 XP)

I update Vagrant to version 1.9.1 & update virtualbox to 5.1.12 ,

run the command:

$ vagrant destroy

and

$ vagrant up

It's fine !

laminbarrow

I had this issue also and I fixed it by opening up the "Oracle Virtual Box Manager" GUI and go to "Settings" -> "Network" and choose "Adapter 1" then expand the option by clicking on the arrow and make sure that "Cable Connected" is checked.

Hope that helps.

awesselius

@Iaminbarrow, thanks! That worked wonderfully!

donpuerto

Just recently installed and got error similar above

Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
Virtual Box
Version 5.1.14 r112924 (Qt5.6.2)

Vagrant
1.9.1
### I followed below procedure got no luck


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

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

Any luck with this issue donpuerto?

amir
amir
1 year ago (10,970 XP)

I'm having the same issue. I haven't used Homestead for a few months and now this is happening. I've tried all recommendations I could find online. I'm now using the newest version of vagrant, virtualbox and homestead. I have virtualization enabled. I have cable connected. Still it's hanging on the private key. One thing I noticed when watching through the virtualbox gui is that I am getting an error:

Failed to start LSB: Blackfire Agent.

Then it goes to login and sits at

homestead login:

I tried messing with this for 6 hours yesterday and I am completely stuck. Any help would be greatly appreciated! Thank you

gente002

Any progress? I am also having this issue. I had everything working on my homestead32bit vagrant box but then when I updated VirtualBox (as prompted) I now cannot get past the SSH auth method.

MartinDevNow

I am having the same Problem.. timeout at

VirtualBox v5.1.22 Vagrant v1.9.6 laravel/homestead v2.1.0 (&v2.2.0)

==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
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.

And, I made sure that Cable Connected is checked

Then, when I run vagrant up homestead-7 I get the following...

$ vagrant up homestead-7
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Running provisioner: file...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
mehany

@laminbarrow brilliant

bullbaotog

I'm running Windows 10. Fixed Mine by enabling Intel Virtualization Technology.

For Asus Motherboard (PRIME B250M-K).

BIOS -> Advance mode -> Advance tab -> CPU Configuration -> Intel Virtualization Technology = Enabled

Please sign in or create an account to participate in this conversation.