3

I just tried to 'vagrant up' the VM from Magento U, and was surprised to get this as a response:

  Bringing machine 'default' up with 'virtualbox' provider...
    ==> 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: 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: Authentication failure. Retrying...
        default: Warning: Authentication failure. Retrying...
        default: Warning: Authentication failure. Retrying...
        default: Warning: Authentication failure. Retrying...
        default: Warning: Authentication failure. Retrying...
        default: Warning: Authentication failure. Retrying...
        default: Warning: Authentication failure. Retrying...

This worked fine before, but with VirtualBox 5.0 and Vagrant 1.7.4, suddenly no dice. How can I make this work?

1 Answer 1

5

I tried a ton of things to fix this, but getting Vagrant to create a new key was the way to go.

  1. Boot the machine with the GUI enabled. Add this to your Vagrantfile:

    config.vm.provider :virtualbox do |vb|

    vb.gui = true

  2. Log into your virtual machine from the GUI, and run these commands :

    mkdir -p /home/vagrant/.ssh

    wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys

    chmod 0700 /home/vagrant/.ssh

    chmod 0600 /home/vagrant/.ssh/authorized_keys

    chown -R vagrant /home/vagrant/.ssh

Vagrant will generate a new key, and you should be good to go.

https://superuser.com/a/745998/421272

2
  • Great solution, thanks! I would not have expected to be able to get in with the GUI because vagrant ssh wasn't working, even though some people reported still being able to do that after getting this error. Commented Sep 17, 2015 at 16:32
  • 1
    Awesome, glad it helped you out. I was losing hair over this, hopefully I was able to prevent some follicle damage on your part!
    – AreDubya
    Commented Sep 17, 2015 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.