OK for what you are saying.
Please check again if the ansible user on the target node is a sudoer user
as i suppose your playbook has tasks to be run in a privileged mode.

On Fri, Sep 3, 2021, 3:40 PM aman kumar chagti <[email protected]>
wrote:

>  PasswordAuthentication: is set to *yes*.. on both target and controller
> servers. FYI
> On Friday, September 3, 2021 at 8:08:50 PM UTC+5:30 aman kumar chagti
> wrote:
>
>> on the target server or on controller server??
>>
>> On Friday, September 3, 2021 at 7:54:28 PM UTC+5:30 [email protected]
>> wrote:
>>
>>> Verify if PasswordAuthentication is set to yes in the
>>> /etc/ssh/sshd_config and restart the sshd service on the managed node.
>>>
>>> On Fri, Sep 3, 2021, 3:07 PM aman kumar chagti <[email protected]>
>>> wrote:
>>>
>>>> hi, I used -vvvv option, and I found something
>>>> .
>>>> *SH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o
>>>> KbdInteractiveAuthentication=no -o
>>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
>>>> *-o
>>>> PasswordAuthentication=no* -o 'User="seconize"' -o ConnectTimeout=10
>>>> -o ControlPath=/home/wyxadministrator/.ansible/cp/68474f4208 x.y.z.x
>>>> '/bin/sh -c '"'"'echo ~hello && sleep 0'"'"''  *
>>>>
>>>> so, if you see, password-based authentication is disabled, some that's
>>>> why it's giving error..how to enable it?? Idk..any idea?? folks
>>>> On Thursday, September 2, 2021 at 8:03:24 PM UTC+5:30 [email protected]
>>>> wrote:
>>>>
>>>>> Which inventory file do you use ? And try to run the playbook with
>>>>> -vvvv for debugging purposes. If you can share the output of the debugging
>>>>> command would be great !
>>>>>
>>>>> On Thu, Sep 2, 2021, 3:04 PM aman kumar chagti <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> I tried these methods..same error coming up
>>>>>>
>>>>>> On Thursday, September 2, 2021 at 7:13:52 PM UTC+5:30
>>>>>> [email protected] wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>> From one side, when using become: yes, verify if the root password
>>>>>>> on the managed nodes is the same as the controller, otherwise use -k and
>>>>>>> specify the root managed node password.
>>>>>>> From another side, when using a dedicated user for ansible, verify
>>>>>>> if that user exist and is a sudoer on the managed nodes when using
>>>>>>> become_method: sudo.
>>>>>>> Hope this helps !
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Sep 2, 2021, 12:55 PM aman kumar chagti <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> when I try to run the playbook on a remote VM using password-based
>>>>>>>> authentication, I'm getting the following error:
>>>>>>>>
>>>>>>>> *fatal: [X.X.X.X]: UNREACHABLE! => {"changed": false, "msg":
>>>>>>>> "Failed to connect to the host via ssh: [email protected]: Permission denied
>>>>>>>> (publickey,password).", "unreachable": true}*user and password are
>>>>>>>> present in the inventory file.
>>>>>>>> but when I try to connect to the VM manually by SSH and using that
>>>>>>>> same password: I'm able to log it. Can anyone figure the solution?
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Ansible Project" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/d/msgid/ansible-project/622ba01f-b89b-49f0-91e2-319f6daee852n%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/ansible-project/622ba01f-b89b-49f0-91e2-319f6daee852n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Ansible Project" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>>
>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/ansible-project/9a6130dc-651f-4e6e-bf7e-7bd033bb3500n%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/ansible-project/9a6130dc-651f-4e6e-bf7e-7bd033bb3500n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ansible Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>
>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/42259a18-ad69-4715-b28c-6b6c04f48228n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ansible-project/42259a18-ad69-4715-b28c-6b6c04f48228n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/867e2a85-b7a1-4240-9d62-28ef67e1f863n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/867e2a85-b7a1-4240-9d62-28ef67e1f863n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFASg1JwG5XSmOavzPmYG-99rPK0Cq-L%3DfMMjbKXXRfB5gHLvg%40mail.gmail.com.

Reply via email to