ERROR! plaintext: 401 Unauthorized

29 views
Skip to first unread message

subbireddy gajulapalli

unread,
Apr 23, 2018, 7:50:04 AM4/23/18
to Ansible Project
ubuntu@ip-172-31-9-47:~/ckp$ ansible all -m win_ping -vvv
Using /home/ubuntu/ckp/ansible.cfg as config file
<172.31.46.234> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5985 TO 172.31.46.234
172.31.46.234 | FAILED! => {
    "failed": true,
    "msg": "ERROR! plaintext: 401 Unauthorized."
}
ubuntu@ip-172-31-9-47:~/ckp$

subbireddy gajulapalli

unread,
Apr 23, 2018, 7:51:31 AM4/23/18
to Ansible Project
please help? 

Jordan Borean

unread,
Apr 23, 2018, 3:49:34 PM4/23/18
to Ansible Project
You are connecting over HTTP (port 5985) using basic auth. This combo does not support message encryption so everything is in plaintext and the WinRM service is rejecting it. You either need to
  • Use an auth that supports message encryption, NTLM, Kerberos or CredSSP, set ansible_winrm_transport: ntlm with the latest version of pywinrm (0.3.0) to test
  • Run over HTTPS instead of HTTP to encrypt the full traffic even with Basic auth
  • Disable the encryption check on the host (do not do this!)

Thanks


Jordan

Reply all
Reply to author
Forward
0 new messages