Vagrant 1.8.6 ?

2016-08-31 16:35:51 +0000

Like most of my team, I use vagrant to run local boxes for development of puppet builds, ruby apis and such like.

I recently upgraded my Windows workstation to vagrant 1.8.5 and immediately ran into an issue.

default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...

This monkey of an issue had me stumped for a while, as on another project, I was working with securing ssh logins to hosts on AWS, which made me suspect my id_rsa key setup under the git BASH.

My sanity has been saved by the admission of a bug on the vagrant issues list https://github.com/mitchellh/vagrant/issues/7610

A swift edit of the C:\HashiCorp\vagrant\embedded\gems\gems\vagrant-1.8.5\plugins\guests\linux\cap\public_key.rb file (line 58) and all is good again.

@@ -54,6 +54,7 @@
if test -f ~/.ssh/authorizedkeys; then
grep -v -x -f '#{remote
path}' ~/.ssh/authorizedkeys > ~/.ssh/authorizedkeys.tmp
mv ~/.ssh/authorizedkeys.tmp ~/.ssh/authorizedkeys
+ chmod 0600 ~/.ssh/authorizedkeys
fi rm -f '#{remote
path}'

The easier fix is to head over to downloads where it is hoped that 1.8.6 will be released on 1st September 2016.

 

XLinkedInGitHubYouTube
© 2017-2025 Neil Millard
Github - Twitter - Finance Tools - Facebook - YouTube channel - Tech Answers Club - Clock