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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -