Skip to content

Setup authorized_keys on Windows 10 Pro (OpenSSH)

Step-by-step guide to configuring authorized_keys on Windows 10 Pro using OpenSSH. Explains why Administrators use administrators_authorized_keys and how to set correct permissions with icacls


Note: Users that are members of the local Administrators group do not use ~\.ssh\authorized_keys.
Windows OpenSSH instead reads:

C:\ProgramData\ssh\administrators_authorized_keys

Install OpenSSH Server

winget install --id Microsoft.OpenSSH --source winget

Add your public SSH key (Administrators only)

Add your public key to:

C:\ProgramData\ssh\administrators_authorized_keys

One key per line.

Fix permissions (required by OpenSSH StrictModes)

icacls "C:\ProgramData\ssh\administrators_authorized_keys" /inheritance:r
icacls "C:\ProgramData\ssh\administrators_authorized_keys" /grant "SYSTEM:F" "Administrators:F"

Restart OpenSSH server

Restart-Service sshd