gdha / sles11sp4-vagrant-box

The creation of the vagrant SLES11 SP4 box (with packer)
GNU General Public License v3.0
1 stars 0 forks source link

/home/vagrant/.ssh/authorized_keys missing #1

Open gdha opened 6 years ago

gdha commented 6 years ago
# vagrant up client --provision
Bringing machine 'client' up with 'virtualbox' provider...
==> client: Checking if box 'gdha/sles11sp4' is up to date...
==> client: Running provisioner: ansible_local...
SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.

On the virtualbox client I ran the sshd in debug mode and saw:

debug1: trying public key file /home/vagrant/.ssh/authorized_keys
debug1: Could not open authorized keys '/home/vagrant/.ssh/authorized_keys': No such file or directory
debug1: restore_uid: 0/0
Failed publickey for vagrant from 10.0.2.2 port 54876 ssh2: RSA b7:ab:26:ec:db:16:89:3b:ac:4e:88:67:1c:69:a9:fe [MD5]
debug3: mm_answer_keyallowed: key 0xb7761400 is not allowed
debug3: mm_request_send entering: type 23
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa [preauth]
debug3: userauth_finish: failure partial=0 next methods="publickey,keyboard-interactive" [preauth]
Connection closed by 10.0.2.2 [preauth]
gdha commented 6 years ago

Added authorized_keys in /home/vagrant/.ssh directory