Laravel homestead failing on “vagrant up” SSH timeout.
If “vagrant up” is failing with an SSH library error, add this to your Laravel project’s Vagrantfile:
The longer version
I recently came across this error on macOS Sierra with Virtualbox and vagrant 1.9.1.
When provisioning or vagrant upping a Laravel homestead VM the process would fail with the following message.
An error occurred in the underlying SSH library that Vagrant uses.
The error message is shown below. In many cases, errors from this library are caused by ssh-agent issues. Try disabling your SSH agent or removing some keys and try again.
If the problem persists, please report a bug to the net-ssh project.
Update your Vagrantfile
config.vm.provider “virtualbox” do |v|
v.gui = true
to the Vagrant file showed that the network adapter was taking over 5 minutes to come online, causing Vagrant’s ssh config to timeout. The problem seems to lie in a missing cableconnected configuration option in the homestead Vagrantfile configuration.
The fix is to add the following configuration to your Homestead Vagrant file:
which allows the Vagrant VM to boot and configure it’s network connections much more quickly.
Problem sorted 🙂