# Ansible, and openssh on Windows 10

**URL:** <https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [May 23, 2019, 7:26pm UTC](https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409 "2019-05-23T19:26:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [May 23, 2019, 7:26pm UTC](https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409/1 "2019-05-23T19:26:58Z")

</div>

Just messing around, but I setup openssh on Windows 10. My administrative user, john, is configured with the public key for my root user from the ansible server. I can ssh from ansible to windows 10 without a password, and things look fine. When trying a simple playbook, however, I get failures left and right. Just wondering if doing this via ssh is even possible yet with windows? I see people out there doing this via cygwin, but not necessarily the openssh that ships with Windows 10.

`fatal: [win10]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to remote host \"win10\". Make sure this host can be reached over ssh", "unreachable": true}`

---

<div class="post-metadata">

**Author:** ![John\_Harmon](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@John\_Harmon](https://forum.ansible.com/u/John_Harmon)\
**Post date:** [May 23, 2019, 8:52pm UTC](https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409/2 "2019-05-23T20:52:37Z")

</div>

I am assuming it isn’t quite baked yet. The ControlPath and other things look to be all linux-based (ie. /bin/sh).

`  
TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /etc/ansible/playbooks/one-offs/windows/test.yml:3  
 Attempting python interpreter discovery  
 ESTABLISH SSH CONNECTION FOR USER: john  
 SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ‘User=“john”’ -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/a2a184ae5b win10 ‘/bin/sh -c ‘"’“'echo PLATFORM; uname; echo FOUND; command -v '”’“'”‘"’“'”‘"’“‘/usr/bin/python’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python3.7’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python3.6’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python3.5’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python2.7’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python2.6’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘/usr/libexec/platform-python’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘/usr/bin/python3’”‘"’“'”‘"’“'”‘"’; command -v ‘"’“'”‘"’“'”‘"’“‘python’”‘"’“'”‘"’“'”‘"’; echo ENDFOUND && sleep 0’“'”‘’  
 (1, ‘’, ‘The system cannot find the path specified.\r\n’)  
 Failed to connect to the host via ssh: The system cannot find the path specified.  
[WARNING]: Unhandled error in Python interpreter discovery for host win10: unexpected output from Python interpreter discovery

Interpreter discovery remote stderr:  
The system cannot find the path specified.

Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py  
Pipelining is enabled.  
 ESTABLISH SSH CONNECTION FOR USER: john  
 SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ‘User=“john”’ -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/a2a184ae5b win10 ‘/bin/sh -c ‘"’“'sudo -H -S -n -u john /bin/sh -c '”’“'”‘"’“'”‘"’“‘echo BECOME-SUCCESS-wwkxsloatrpecpvtnxmjliczqzkrfzle ; /usr/bin/python’”‘"’“'”‘"’“'”‘"’ && sleep 0’“'”‘’  
 (1, ‘’, ‘The system cannot find the path specified.\r\n’)  
 Failed to connect to the host via ssh: The system cannot find the path specified.  
fatal: [win10]: FAILED! =\> {  
“ansible\_facts”: {},  
“changed”: false,  
“msg”: “The following modules failed to execute: setup\n setup: MODULE FAILURE\nSee stdout/stderr for the exact error\n”  
}

`

---

<div class="post-metadata">

**Author:** ![Richard\_Bywater1](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Richard\_Bywater1](https://forum.ansible.com/u/Richard_Bywater1)\
**Post date:** [May 25, 2019, 11:14am UTC](https://forum.ansible.com/t/ansible-and-openssh-on-windows-10/30409/3 "2019-05-25T11:14:11Z")

</div>

Haven’t used it myself as I only manage Linux hosts but [https://docs.ansible.com/ansible/latest/user\_guide/windows\_faq.html#can-i-connect-to-windows-hosts-over-ssh](https://docs.ansible.com/ansible/latest/user_guide/windows_faq.html#can-i-connect-to-windows-hosts-over-ssh) is relevant to your query.

Richard.
