# ERROR! plaintext: 401 Unauthorized

**URL:** <https://forum.ansible.com/t/error-plaintext-401-unauthorized/27348>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [April 23, 2018, 11:50am UTC](https://forum.ansible.com/t/error-plaintext-401-unauthorized/27348 "2018-04-23T11:50:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbireddy\_gajulapal](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@subbireddy\_gajulapal](https://forum.ansible.com/u/subbireddy_gajulapal)\
**Post date:** [April 23, 2018, 11:50am UTC](https://forum.ansible.com/t/error-plaintext-401-unauthorized/27348/1 "2018-04-23T11:50:04Z")

</div>

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$

---

<div class="post-metadata">

**Author:** ![subbireddy\_gajulapal](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@subbireddy\_gajulapal](https://forum.ansible.com/u/subbireddy_gajulapal)\
**Post date:** [April 23, 2018, 11:51am UTC](https://forum.ansible.com/t/error-plaintext-401-unauthorized/27348/2 "2018-04-23T11:51:30Z")

</div>

please help?

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [April 23, 2018, 7:49pm UTC](https://forum.ansible.com/t/error-plaintext-401-unauthorized/27348/3 "2018-04-23T19:49:33Z")

</div>

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
