-
Notifications
You must be signed in to change notification settings - Fork 794
Description
"OpenSSH for Windows" version
7.7.2.2
Server OperatingSystem
Windows Server 2019
Client OperatingSystem
N/A
What is failing
I manually recreated the administrators_authorized_keys file which caused it to inherit permissions from its parent. This was a problem, but it wasn't obvious. A connecting client would believe that their key was rejected. On the server, the following two Operational entries show in event viewer which doesn't reveal any specific problems:
sshd: Authentication refused.
sshd: Failed publickey for USER from ...
After confirming that the key data was proper, I switched to debug output (and switched to local0/file), now I see this which still does not indicate any particular problems:
debug1: trying public key file __PROGRAMDATA__/ssh/administrators_authorized_keys
Authentication refused.
After more head-scratching and eventually capturing debug3 output, I finally see this:
debug1: trying public key file __PROGRAMDATA__/ssh/administrators_authorized_keys
debug3: Bad permissions. Try removing permissions for user: S-1-5-11 on file C:/ProgramData/ssh/administrators_authorized_keys.
Authentication refused.
Expected output
The bad permissions output should have a verbosity level that is much than debug3; probably not debug at all.