ansible ssh permision denied -
ansible ssh permision denied -
i'm generated ssh key, , re-create remote server. when seek ssh server works fine:
ssh user@ip_address
user not root. if seek ssh throw ansible:
ansible-playbook -i hosts playbook.yml
with ansible playbook:
--- - hosts: web remote_user: user tasks: - name: test connection ping:
and hosts file:
[web] 192.168.0.103
i got error:
... permission denied (publickey,password)
what's problem?
ansible using different key compared using connect 'web' machine.
you can explicitly configure ansible utilize specific private key
private_key_file=/path/to/key_rsa
as mentioned in the docs create sure authorize key ansible uses, remote user in remote machine ssh-copy-id -i /path/to/key_rsa.pub user@webmachine_ip_address
ssh ansible ssh-keys ansible-playbook
Comments
Post a Comment