# winrm best practices? can we use ssh on windows instead?

**URL:** <https://forum.ansible.com/t/winrm-best-practices-can-we-use-ssh-on-windows-instead/19114>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 26, 2015, 10:42am UTC](https://forum.ansible.com/t/winrm-best-practices-can-we-use-ssh-on-windows-instead/19114 "2015-08-26T10:42:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixel\_fairy](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pixel\_fairy](https://forum.ansible.com/u/pixel_fairy)\
**Post date:** [August 26, 2015, 10:42am UTC](https://forum.ansible.com/t/winrm-best-practices-can-we-use-ssh-on-windows-instead/19114/1 "2015-08-26T10:42:36Z")

</div>

I was thinking about that given this workaround, [https://github.com/ansible/ansible/issues/10294#issuecomment-93629047](https://github.com/ansible/ansible/issues/10294#issuecomment-93629047)

any windows experts here? how do you handle winrm in your server templates? everything below is easily learned from the ssh man page. i couldnt find much of this on microsofts site, but maybe i dont know where to look.

public key auth. seems to support these with (x509?) certs. my guess is your supposed to use domain auth, but certs only work with local accounts.

host key verification, https probably serves this purpose, but how do you verify? also, how would you auto generate host certificates in each new instance of a template? (in linux, my packer script deletes the host keys and adds a couple lines to rc.local to generate them on boot if they’re missing)

installation / removal of client keys (certificates). in ssh this is just the authorized\_keys file.

wonder if were better off with ssh. if these rumors are true, microsoft might be thinking that too, [http://blogs.msdn.com/b/powershell/archive/2015/06/03/looking-forward-microsoft-support-for-secure-shell-ssh.aspx](http://blogs.msdn.com/b/powershell/archive/2015/06/03/looking-forward-microsoft-support-for-secure-shell-ssh.aspx)

i use a windows packer file with cygwin for ssh, can that be used with ansibles windows modules?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [September 3, 2015, 4:41pm UTC](https://forum.ansible.com/t/winrm-best-practices-can-we-use-ssh-on-windows-instead/19114/2 "2015-09-03T16:41:55Z")

</div>

Ssh would be nice as a transport but until its a thing, creating a connection plugin for it would be kinda hard.
