I'm running Laravel Vagrant Homestead and I decided to sweep through to clean up all my projects and also move the location of my primary projects folder from my desktop to my C:/ just to keep things more organized. When I booted up my VM, it fails to authenticate. 
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
I've followed a few steps and checked my ssh key paths in my Homestead.yaml and all looks ok.
I ran vagrant ssh-config:
$ vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile C:/Users/David/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL
and edited insecure_private_key to match my own (I saw that as an answer somewhere) but to no avail. 
Here's my Homestead.yaml (modified to remove website name):
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: C:/Users/David/.ssh/id_rsa.pub
keys:
    - C:/Users/David/.ssh/id_rsa
folders:
    - map: C:/Code/projects/website
      to: /home/vagrant/projects/website
sites:
    - map: website.app
      to: /home/vagrant/projects/website/public
variables:
    - key: APP_ENV
      value: local
I assure that the path to my ssh keys have not been modified. I've only started experiencing this issue after cleaning up my projects on the VM and moving my main code folder to C:/ and doing the remapping.
Base on your log, the VM is up. Just that Vagrant can't SSH.
Most probably you mess with the authorized_keys in the VM (~./ssh/authorized_keys)
Leave the vagrant as it is, start another command prompt.
Temporary copy the key from this site in you clipboard.
https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
Use putty to SSH in.
putty [email protected] -p 2222
Type the following:
echo "--paste from clipboard--" > ./authorized_keys
exit putty
type Vagrant reload notice it will detect the key is not secure and auto inject new one.
You Vagrant should be up now.
HTH.
This happened when homestead had not been used for a long time.
The box was updated with:
vagrant box add laravel/homestead
Then the issue above arose.
The easiest thing to do would be to destroy homestead and thing bring it up again. Your config will persist as it is in ~/.homestead/Homestead.yml
homestead destroy
homestead up
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With