Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set permissions ACL for Windows OpenSSH administrators_authorized_keys
# this script is copied from:
# Script by Mitchell Grande of
$acl = Get-Acl C:\ProgramData\ssh\administrators_authorized_keys
$acl.SetAccessRuleProtection($true, $false)
$administratorsRule = New-Object"Administrators","FullControl","Allow")
$systemRule = New-Object"SYSTEM","FullControl","Allow")
$acl | Set-Acl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment