Getting Past Vagrant's ''Authentication Failure'' When Starting OpenShift Origin
Using Vagrant to provision VMs and want to use Red Hat's OpenShift Origin image? Well, if you're using an older version of Vagrant, you might run into a problem. Here's the answer.
Join the DZone community and get the full member experience.Join For Free
For getting up and running quickly with OpenShift Origin, Red Hat has an all-in-one VM image you can provision with Vagrant. The instructions mention to not use Vagrant 1.8.5 as there’s an issue with the SSH setup. Well, because I already had 1.8.5 installed for some other projects, I tried anyway, and ran into issues with SSHing into the VM with SSH keys.
When provisioning the VM, you’ll see:
Kevins-MacBook-Pro:openshift-origin kev$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'openshift/origin-all-in-one' is up to date... ==> default: Resuming suspended VM... ==> 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: Authentication failure. Retrying... default: Warning: Authentication failure. Retrying...
The suggestions relate to switching from the SSH authentication to userid/password by adding this to your Vagrantfile:
config.ssh.username = "vagrant" config.ssh.password = "vagrant"
I tried this, and when running vagrant up, I had different errors saying to the effect of, “SSH authentication failed.” Next, I tried adding this recommendation:
config.ssh.insert_key = false
This didn’t make any difference initially, but doing a Vagrant destroy, and then trying to bring it up again initially ran into the same issue. So, I Ctrl-C’d out and tried again, and then it worked the second time. I’m not sure what steps got past the SSH keys issue, but at this point, I was up and running. There’s a long discussion in both the linked threads above that describe the cause of the issue, so if you’re interested, take a look through those threads.
Published at DZone with permission of Kevin Hooke, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.