Open aragon5956 opened 1 month ago
same error +1.
Do either of the work arounds from these issues resolve what you are seeing?
https://github.com/PowerShell/Win32-OpenSSH/issues/2287 https://github.com/PowerShell/Win32-OpenSSH/issues/2282
ça m'aide pas
Can you run the following from an elevated PowerShell session:
# limit ssh folder permissions to full control for system and local group administrators, and read for authenticated users
$directoryPath = "$env: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
# limit log folder permissions to full control for system and local group administrators, and read for authenticated users
$directoryPath = "$env:ProgramData\ssh\logs"
$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
I will see as soon as, if the service configuration points to
C:\Program Files\OpenSSH\sshd
And no to
C:\Program Files\OpenSSH\
Can you run the following from an elevated PowerShell session:
# limit ssh folder permissions to full control for system and local group administrators, and read for authenticated users $directoryPath = "$env: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 # limit log folder permissions to full control for system and local group administrators, and read for authenticated users $directoryPath = "$env:ProgramData\ssh\logs" $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
awesome !! it's solved the problem of starting the service sshd in windows after create the logs
directory for local account , but no for account
trying to modify the given script one realizes that one can not make exceptions for Administrators and System fr: en essayant de modifier le script donné on se rend compte que l'on peut pas faire des exceptions pour Administrateurs et System
Prerequisites
Steps to reproduce
**hello , i've problem with access rights :
i've the same error even i execute .
\FixHostFilePermissions.ps1
and.\FixUserFilePermissions.ps1
, and i don't have : "NT Service\sshd" :**could you help me ? my sshd version is :
i can't assign user policies such as: "Log in as a service", which I did not.
.the error also depends on the parameters of the service, currently it is configured in this way:
I don’t get the same error if I log in locally :
could you help me ? Regards
Expected behavior
Actual behavior
Error details
Environment data
Version
PS C:\Program Files\OpenSSH> .\sshd.exe -d debug1: sshd version OpenSSH_for_Windows_9.5, LibreSSL 3.8.2 debug1: private host key #0: ssh-rsa SHA256:ClEXD2C/iaTwtFDxUOPwcIrK8+CqXHlutDxXSgzIPTM debug1: private host key #1: ecdsa-sha2-nistp256 SHA256:7qwfTYBphjkTNFm+wSF+LX9P9JKPMgu++qLcOKjd/FQ debug1: private host key #2: ssh-ed25519 SHA256:T3TryzsUax+Lm1/tPpZtoH12STRWvMY/teFwy4HPa6o debug1: rexec_argv[0]='C:\\Program Files\\OpenSSH\\sshd.exe' debug1: rexec_argv[1]='-d' debug1: Bind to port 22 on 0.0.0.0. Server listening on 0.0.0.0 port 22.
Visuals