https://stackoverflow.com/questions/16212816/setting-up-openssh-for-windows-using-public-key-authentication.
Note that Repair-AuthorizedKeyPermission BREAKs authentication.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
After making the changes mentioned in the SO answer I was able to get authentication with keypairs working.
This is a major problem, either with the docs or the products. That SO question is over 6 years old and the "best" answer is 2 years old. There are multiple issues affecting even very experienced folks from getting started with SSHD on Windows...
See Pull Request #4788 for a suggested improvement to this issue.
(The PR will close this issue ticket when it gets merged.)
Most helpful comment
This is a major problem, either with the docs or the products. That SO question is over 6 years old and the "best" answer is 2 years old. There are multiple issues affecting even very experienced folks from getting started with SSHD on Windows...