This is documented on this page under the section "vagrant" User: ssh directory 0700 permissions and the authorized_keys file 0600 permissions. How does Vagrant know what private key to pass to the public key in your box on the first Up command? Well those who create boxes for public use are supposed to put the Vagrant public key in the ~/.ssh/authorized_keys file and then assign the. It seems like maybe it changes after a new random public key has been inserted. But I can't see how to change the ubuntu box to default to private key. On other boxes it seems to default to private key, and if you specify a config.vm.password in the VagrantFile it swithces to password. SIDE NOTE: I've been unable to figure out how to change this chosen auth method for the ubuntu/xenial64 box. I still don't know why and although I kept copies of the 'bad' directories ( /opt/vagrant and ~/.vagrant.d) I've lost too much time to this to do any more debugging. So then I did the Windows thing: Re-installed Vagrant from scratch. Today, working from home, I proceeded to switch out things to see if it made any difference - out went rvm, out went environment variables VAGRANT_VMWARE_CLONE_DIRECTORY and VAGRANT_DEFAULT_PROVIDER. Yet you guessed it: they were all fine! I carried on and got some work done. So when I next used the work machine I expected the vagrant up command to fail. Both are treated almost exactly the same in terms of installed software:īoth run Vagrantfile configurations in several GitHub projects checked out the same on both machines and so identical. However I have two somewhat identical machines I work on - one at home (iMac 5k) where the failure was occurring and one at work (MacBook Pro). So that was my first thought and I worked on other stuff. I couldn't think of anything I'd done in the intervening time to change the config except install the production release of Yosemite. I tried all combinations of setting _key and _key_path with no results. This happened both with boxes I'd built and were working fine and with Hashicorp boxes (precise64). Yet if you SSH'd into them manually all was fine. I had the same problem - in the last week my Vagrant machines would all fail to come up with the Authentication failure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |