Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

scott0's avatar

Homestead hangs at SSH auth method: private key

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!

0 likes
27 replies
clay's avatar

did you make any progress with this?

ejdelmonico's avatar

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's avatar

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.

1 like
ejdelmonico's avatar

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

2 likes
kelsen's avatar

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 !

1 like
laminbarrow's avatar

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.

9 likes
donpuerto's avatar

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
1 like
amir's avatar

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

1 like
gente002's avatar

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's avatar

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.
bullbaotog's avatar

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

3 likes
Ace's avatar

any news regarding this I have the same issue with homestead 7 and the latest virtual boxes, on el capitan

solved:upgraded virtualbox to 5.2

jghomestead's avatar

I'm using Homestead on Macbook.

I did the following and it fixed this problem for me.

Updated Virtualbox Updated Vagrant

Destroyed my homestead-7 box: $ vagrant destroy

Re-provision the box: $ vagrant reload --provision

Re-up the box: $ vagrant up

That did it for me. Re-provisioning I think was the key.

EPIan's avatar

HP 250 G5 Notebook - solved this issue by enabling Intel Virtualisation Technology as per bullbaotog's suggestion.

Tellurian's avatar

Same here and this is a fresh install on

Already tried to reinstall everything but still stuck here :

$ vagrant up
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: 4040 (guest) => 4040 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 8025 (guest) => 8025 (host) (adapter 1)
    homestead-7: 27017 (guest) => 27017 (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

Homestead.yaml :

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: c:/Users/Tellurian/.ssh/id_rsa.pub

keys:
    - c:/Users/Tellurian/.ssh/id_rsa

folders:
    - map: c:/Users/Tellurian/code
      to: /home/vagrant/code

sites:
    - map: homestead.test
      to: /home/vagrant/code/public

databases:
    - homestead
Tellurian's avatar

Just find out that the Intel(R) Processor Identification Utility was telling me that Virtualization is on but in fact, in the BIOS, it wasn't

SteamDiesel's avatar

@BULLBAOTOG - Yep. solved my problem. It said that it has discarded the insecure key and crated a new one. sick.

bentz's avatar

Just ran into this issue today (Oct 2022) - While it was hanging, all I had to do was bring up the Virtualbox GUI, click once on the "homestead" vm name, then the output in the "preview" window started updating and the connection happened automatically. It's like the machine setup was stalled waiting for the VBox GUI to be opened? Strange.

2 likes
PhilKz's avatar

@bentz I'm experiencing the same thing. Did you ever find out why this was happening or how to fix it?

bentz's avatar

@PhilKz Sorry, no... I recently moved to a MacOS setup and no longer have to deal with this issue.

1 like
gescott14's avatar

@PhilKz I just had this problem and when I looked at the Virtualbox GUI, the Preview window showed a prompt waiting for me to choose Ubuntu or Advanced Setup options. I clicked the Show button, which brought up the linux terminal where I was able to hit enter to startup in Ubuntu and everything booted smoothly after that.

1 like

Please or to participate in this conversation.