Currently I am using vagrant box and ansible . My local config network is config.vm.network "private_network", ip: "192.168.33.10".
I added a user in vagrant box by using playbook-ansible:
hosts: all
remote_user: vagrant
sudo: true
tasks:
authorized_key: user=root
key="{{ lookup('file','/home/root/.ssh/id_rsa.pub') }}"
path=/etc/ssh/authorized_keys/root
manage_dir=no
When I did vagrant ssh
I could see the 'root' user in home directory and authorized key in /etc/ssh/authorized/toot, but when I do [email protected]
Agent admitted failure to sign using the key.
[email protected]'s password:
It is asking for password. I tries everything to login without password(ssh key based authentication).