As a workaround for now I changed my Vagrantfile to not replace the insecure key
cfg.ssh.insert_key = false # don't replace insecure key On Wednesday, September 4, 2019 at 7:15:18 AM UTC+2, boldlookup wrote: > > Hi, > I am trying to package a LXC box. This LXC box I created using Vagrantfile > similar to snippet below. > > Before I run vagrant package I put the Vagrant public key authorized_keys. > This is a required step is my understanding after having packaged a few > VirtualBox boxes. > > For this LXC box I end up with a box file which includes a private_key > file. After I import the box the key is > > /home/<username>/.vagrant.d/boxes/c2-VAGRANTSLASH-ubuntu1804/0.1.0/lxc/vagrant_private_key > > > Subsequently Vagrant fails to SSH into the box because the authorized_keys > only contains the Vagrant public key that I put there. > > Where does this private_key come from? How do I prevent it from being > packaged into the box? > > Vagrant.configure(2) do |config| > config.vm.define 'ubuntu1804' do |cfg| > cfg.vm.box = 'emptybox/ubuntu-bionic-amd64-lxc' > cfg.vm.provider :lxc do |lxc| > lxc.container_name = :machine > end > cfg.vm.provision 'chef_zero' do |chef| > > ... > > end > end > end > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/ac5397d2-06d7-40b6-931a-4057a1d2e41c%40googlegroups.com.
