I think you are getting closer. Look at the admin users section of this guide.
https://www.concurrency.com/blog/may-2019/key-based-authentication-for-openssh-on-windows
On Tue, 2020-01-14 at 16:46 +0000, Rob Berendt wrote:
PS C:\WINDOWS\system32> Stop-Service sshd
PS C:\WINDOWS\system32> Repair-AuthorizedKeyPermission C:\Users\rob\.ssh\authorized_keys
[*] C:\Users\rob\.ssh\authorized_keys
'NT SERVICE\sshd' needs Read access to 'C:\Users\rob\.ssh\authorized_keys'.
Shall I make the above change?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
'NT SERVICE\sshd' now has Read access to 'C:\Users\rob\.ssh\authorized_keys'.
Repaired permissions
PS C:\WINDOWS\system32> Start-Service sshd
PS C:\WINDOWS\system32> Get-Service sshd
Status Name DisplayName
------ ---- -----------
Running sshd OpenSSH SSH Server
I modified C:\ProgramData\ssh\sshd_config
# Logging
#SyslogFacility AUTH
SyslogFacility LOCAL0
#LogLevel INFO
LogLevel DEBUG
Then
PS C:\WINDOWS\system32> Stop-Service sshd
PS C:\WINDOWS\system32> Start-Service sshd
PS C:\WINDOWS\system32> Get-Service sshd
Status Name DisplayName
------ ---- -----------
Running sshd OpenSSH SSH Server
When reading the data below, is it possible that it doesn't even try my key but looks for some key based on my Windows access instead?
debug1: Could not open authorized keys '__PROGRAMDATA__/ssh/administrators_authorized_keys': No such file or directory
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.