The permissions on the LOG directory was wrong.
I removed the LOG folder, restarted the service and everything started working again. The LOG folder was automatically re-created.
But.. if you enter the logfile (as admin user), and after accepting "you need admin permissions to access this folder", your username end up in the list op users with read permissions.
after that, the deamon won't start again.
removing the user from the security list of the LOG folder solves this, and the service starts again. :(
From Microsoft December 2024 monthly update, known issues section:
https://support.microsoft.com/kb/5048661
Following the installation of the October 2024 security update, some customers report that the OpenSSH (Open Secure Shell) service fails to start, preventing SSH connections. The service fails with no detailed logging, and manual intervention is required to run the sshd.exe process.
Workaround:
Customers can temporarily resolve the issue by updating permissions (ACLs) on the affected directories. Follow these steps:
Open PowerShell as an Administrator.
Update the permissions for C:\ProgramData\ssh and C:\ProgramData\ssh\logs to allow full control for SYSTEM and the Administrators group, while allowing read access for Authenticated Users. You can restrict read access to specific users or groups by modifying the permissions string if needed.
Use the following commands to update the permissions:
$directoryPath = "C:\ProgramData\ssh"
$acl = Get-Acl -Path $directoryPath
$sddlString = "O:BAD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x1200a9;;;AU)"
$securityDescriptor = New-Object System.Security.AccessControl.RawSecurityDescriptor $sddlString $acl.SetSecurityDescriptorSddlForm($securityDescriptor.GetSddlForm("All"))
Set-Acl -Path $directoryPath -AclObject $acl
- Repeat the above steps for C:\ProgramData\ssh\logs.
Win32 OpenSSH Issue #2282 Opened October 8, indicating the issue began with version 9.4:
v9.4.0.0p1 and later enforce permissions on the logs folder, leading to undiagnosable crashes of the service after Windows Update #2282
https://github.com/PowerShell/Win32-OpenSSH/issues/2282
Linked to this pull request:
add check for prog data folder permissions during sshd service startup #686
https://github.com/PowerShell/openssh-portable/pull/686