# Unable to authenticate through CredSSP

**URL:** <https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 23, 2018, 6:08am UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634 "2018-09-23T06:08:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shyam](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Shyam](https://forum.ansible.com/u/Shyam)\
**Post date:** [September 23, 2018, 6:08am UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634/1 "2018-09-23T06:08:36Z")

</div>

Hi all,

Im unable to connect to windows using the credssp authentication issue. Im getting the following error,

x.x.x.x | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “credssp: HTTPSConnectionPool(host=‘x.x.x.x’, port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError(‘\<urllib3.connection.VerifiedHTTPSConnection object at 0x7f77cc40cfd0\>: Failed to establish a new connection: [Errno 111] Connection refused’,))”,  
“unreachable”: true

Inventory file settings,

ansible\_user: Administrator  
ansible\_password: xxxxxx  
ansible\_port: 5986  
ansible\_connection: winrm  
ansible\_winrm\_scheme: https  
ansible\_winrm\_transport: credssp  
ansible\_winrm\_server\_cert\_validation: ignore

Thanks,  
Shyam

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [September 23, 2018, 7:08am UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634/2 "2018-09-23T07:08:34Z")

</div>

Is your user a part of admin group?

---

<div class="post-metadata">

**Author:** ![Shyam](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Shyam](https://forum.ansible.com/u/Shyam)\
**Post date:** [September 23, 2018, 12:56pm UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634/3 "2018-09-23T12:56:50Z")

</div>

> > Hi Ankit,

Thanks for your reply. The user have all the admin rights. Still Im unable to connect to the remote host. Same error.

---

<div class="post-metadata">

**Author:** ![Shyam](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Shyam](https://forum.ansible.com/u/Shyam)\
**Post date:** [September 23, 2018, 1:59pm UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634/4 "2018-09-23T13:59:58Z")

</div>

Hi,

Im able to ping with Basic AUTH and NTLM, using the port number 5985. But when Im trying to connect with CredSSP, Im getting the error.

Settings for Basic and NTLM in inventory

---

<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:** [September 23, 2018, 8:05pm UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634/5 "2018-09-23T20:05:41Z")

</div>

You have to make sure CredSSP is enabled in the server roles with ‘Enable-WSManCredSSP -Role Server’ [https://docs.microsoft.com/en-us/powershell/module/microsoft.wsman.management/enable-wsmancredssp](https://docs.microsoft.com/en-us/powershell/module/microsoft.wsman.management/enable-wsmancredssp). This is because CredSSP uses unconstrained delegation and people should be aware of the potential security risks that come with unconstrained delgation.

You can verify what has been enabled or disabled by running ‘winrm get winrm/config/service/auth’ on your Windows host as well.

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Shyam](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Shyam](https://forum.ansible.com/u/Shyam)\
**Post date:** [September 27, 2018, 4:19am UTC](https://forum.ansible.com/t/unable-to-authenticate-through-credssp/28634/6 "2018-09-27T04:19:40Z")

</div>

Hi Jordan,

Thanks for your replay. Issue got fixed, after enabling ‘Enable-WSManCredSSP -Role Server’

Thanks for your help.  
Shyam
