Closed crowding closed 4 years ago
Sorry it took so long for me to get to it, I've added the ability to control this option with https://github.com/jborean93/ansible-role-win_openssh/pull/7. It also keys this working with non-English locales if you are running that and want a shared location.
I think when setting "opt_openssh_shared_admin_key: True", the "opt_openssh_pubkeys" should be installed in the shared location.
I had trouble getting public key authentication to work with this role and a clean install of Win10. I found that a recent change to Win32OpenSSH has changed the location of the authorized_keys file for users in group Administrators. Users in Administrators group now look for keys in
__PROGRAMDATA__\ssh\administrators_authorized_keys
instead of in their home directory.Refs: https://github.com/PowerShell/Win32-OpenSSH/issues/1324 https://github.com/PowerShell/Win32-OpenSSH/wiki/sshd_config#authorizedkeysfile
For now, I've worked around the issue in my playbook by doing the following, so maybe these steps could be folded back into the role: