Hi, thanks for getting back to me. I tried what you said, both on my own computer and my colleague's computer. Both cases after bringing up the box with no provisioning, vagrant ssh failed.
Here's the Vagrantfile: Vagrant.configure("2") do |config| config.ssh.insert_key = false config.vm.box = "ubuntu/xenial64" config.vm.boot_timeout = 600 config.vm.hostname = "twelveandus" config.vm.network :private_network, ip: "192.168.33.34" config.vm.synced_folder ".", "/home/vagrant/" config.vm.provision :shell, path: "vagrant/bootstrap.sh" config.vm.provision :shell, path: "vagrant/startup.sh", run: "always" config.vm.provider "virtualbox" do |v| v.memory = 2048 end end On Sunday, 11 March 2018 18:55:34 UTC, Alvaro Miranda Aguilera wrote: > > share a zip with the project or the Vagrantfile if you don' have any > provision. > > I would say > > 1. try like this > > vagrant destroy > vagrant up --no-provision > vagrant ssh > vagrant reload > > works? > > if yes, something is breaking this > > 2. try with a different box > > vagrant destroy > vagrant up --no-provision > vagrant ssh > vagrant reload > > works? > > then something is broken with the box > > > Alvaro > > > On Sun, Mar 11, 2018 at 1:28 PM, 'Marcus Povey' via Vagrant < > vagra...@googlegroups.com <javascript:>> wrote: > >> This is a weird one that I can't get to the bottom of... >> >> Linux vagrant box, booted and provisioned OK. >> >> If the box is spun up using "vagrant up", subsequent calls to "vagrant >> ssh" will fail with "invalid public key". Vagrant ssh-config points to the >> insecure key (correct). >> I have also tried removing "config.ssh.insert_key = false" and using the >> secure generated keys. Same effect. >> >> I've also tried specifying a host in my ~/.ssh/config: >> >> Host 127.0.0.1 >> User vagrant >> IdentityFile ~/.vagrant.d/insecure_private_key >> Port 2222 >> IdentitiesOnly yes >> >> SSH from the console also fails. >> >> Interestingly, vagrant up --provision will connect and run the >> provisioning script, so at some point vagrant is able to connect via ssh, >> although after the box has booted "vagrant halt" can no longer connect. >> >> Now, here's the really weird part... >> >> If I spin up the box manually using the VirtualBox GUI, after the machine >> is booted both ssh and "vagrant ssh" work with no problem. "Vagrant halt" >> is able to connect and everything works as expected (although I have to >> manually log in and mount my sync dir) >> >> So, it very much seems that at some stage "vagrant up" is changing the >> ssh key somehow, although when boot the box using virtualbox and log in, my >> authorized_keys file for the vagrant user is correct, and the date on it >> shows it has not been modified since the box was originally provisioned. >> >> Vagrant 2.0.2, on an Ubuntu host. Virtualbox 5.2 >> >> Any ideas what's going on? >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/vagrant/issues >> IRC: #vagrant on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Vagrant" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to vagrant-up+...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/vagrant-up/ef4ef8bf-1ab6-44fb-83fd-38df24f5fe35%40googlegroups.com >> >> <https://groups.google.com/d/msgid/vagrant-up/ef4ef8bf-1ab6-44fb-83fd-38df24f5fe35%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Alvaro > > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/a42302b8-e1c2-4793-8efd-b48108be8cf6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.