# Install OpenSSH
Add-WindowsCapability -Online -Name OpenSSH.Server
# Set the sshd service to be started automatically.
Get-Service -Name sshd | Set-Service -StartupType Automatic -PassThru
# Start the sshd service.
Start-Service sshd
# Load your key files into ssh-agent.
ssh-add $env:USERPROFILE\.ssh\id_ecdsa
# Copy the public key file generated previously on your client to the authorized_keys file on your server.
Copy-Item $env:USERPROFILE\.ssh\id_ecdsa.pub $env:ProgramData\ssh\administrators_authorized_keys
# fix ACLs
Icacls.exe $env:ProgramData\ssh\administrators_authorized_keys /inheritance:r /grant Administrators:F /grant SYSTEM:F