Watch out for unicode authorized_keys
So I make an authorized_keys file for OpenSSH to use under windows using this powershell command:
$env:SSH_PUBLIC_KEY | Out-File c:\ProgramData\ssh\administrators_authorized_keys
Why doesn't it work? Because it's unicode.
You have to do:
$env:SSH_PUBLIC_KEY | Out-File c:\ProgramData\ssh\administrators_authorized_keys -Encoding ascii