Windows Host Issue: Consider changing the remote tmp path in ansible.cfg to a path rooted in

Greeting Guys,

I am using Ansible 2.9.6 from a Debian machine and i am trying to run the ping_win module
on a windows target host but i am presented with this error.

“”"
“msg”: “Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in "/tmp". Failed command was: ( umask 77 && mkdir -p "echo /tmp/.ansible-abc/ansible-tmp-1608935561.4827693-223757110227446" && echo ansible-tmp-1608935561.4827693-223757110227446="echo /tmp/.ansible-abc/ansible-tmp-1608935561.4827693-223757110227446" ), exited
with result 1”,
“unreachable”: true
}
“”"

Even thought i am able to ssh to the windows host fine by running
ssh <ip-of-the-server>

Any help is appreciated.

What authentication are you using?

I am using password authentication https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#win32-openssh-authentication

Does it work if you use ntml or kerberos auth

i am using openssh not winrm. I am not sure if i can use NTLM or kerberos with openssh.

Okay following the Microsoft official openssh docs on how to install it made it work for me.
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse