error

21 views
Skip to first unread message

trupti kokare

unread,
Feb 11, 2023, 5:22:11 AM2/11/23
to Ansible Project
ansible master failed to connect to the ansible node 
showing error
"changed": false,
    "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'xx.xx.xx.xx' (ECDSA) to the list of known hosts.\r\nPermission denied (publickey).",
    "unreachable": true

plz help me out

Antony Stone

unread,
Feb 11, 2023, 5:29:23 AM2/11/23
to ansible...@googlegroups.com
On Saturday 11 February 2023 at 10:22:11, trupti kokare wrote:

> Permission denied (publickey)

> plz help me out

Make sure that the ansible user on your master can SSH to the node, before you
expect ansible to be able to do it on its own.

Basically, you need to copy the public key from the master to the node.

https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html

See "Setting up SSH keys".


Antony.

--
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++

Please reply to the list;
please *don't* CC me.

trupti kokare

unread,
Feb 11, 2023, 5:58:35 AM2/11/23
to Ansible Project
I have centos user & cetos user is connecting via ssh to the node but via ansible  it is throwing error

Dick Visser

unread,
Feb 11, 2023, 3:07:30 PM2/11/23
to ansible...@googlegroups.com
On Sat, 11 Feb 2023 at 11:58, trupti kokare <trupk...@gmail.com> wrote:
I have centos user & cetos user is connecting via ssh to the node but via ansible  it is throwing error

Those are two different usernames, that is a problem.
--
Sent from Gmail Mobile

Antony Stone

unread,
Feb 11, 2023, 3:34:01 PM2/11/23
to ansible...@googlegroups.com
On Saturday 11 February 2023 at 10:28:58, Antony Stone wrote:

> On Saturday 11 February 2023 at 10:22:11, trupti kokare wrote:
> > Permission denied (publickey)
> >
> > plz help me out

Repeating with emphasis this time:

> Make sure that *the ansible user on your master* can SSH to the node, before
> you expect ansible to be able to do it on its own.
>
> Basically, you need to copy the public key from the master to the node.
>
> https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.
> html
>
> See "Setting up SSH keys".
>
>
> Antony.

--
René Descartes walks in to a bar.
The barman asks him "Do you want a drink?"
Descartes says "I think not," and disappears.
Reply all
Reply to author
Forward
0 new messages