Dear Maintainer,
When vagrant-lxc places its authorized_keys file in to a new centos7 vm's ~vagrant/.ssh directory, it does so with too permissive ownership.
As a result, the centos7 vm's ssh wont allow ssh login.
I can work around this by manually running the following in another terminal, whilst the vm is being created
chmod 600 /var/lib/lxc/<vagrant vm name>/rootfs/home/vagrant/.ssh/authorized_keys
Here is the main terminal output, the "Authenticaion failure" will repeat over and over and eventually fail. The following examples shows when i perform the manual work around above.
dean@cliffjumper:~/git/stash/conform-OIE-module$ vagrant up --provider=lxc
Bringing machine 'default' up with 'lxc' provider...
==> default: Importing base box 'goodsmileduck/centos-7-lxc'...
==> default: Checking if box 'goodsmileduck/centos-7-lxc' is up to date...
==> default: Setting up mount entries for shared folders...
default: /foo-module => /home/dean/git/stash/my-foo-module
==> default: Starting container...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 10.0.3.252:22
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
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...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
==> default: Machine booted and ready!
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Loaded plugins: fastestmirror
==> default: Determining fastest mirrors
==> default: * base: centos.mirror.crucial.com.au
==> default: * extras: centos.mirror.crucial.com.au
==> default: * updates: centos.mirror.crucial.com.au
==> default: Resolving Dependencies