OpenSSH Server on Windows 10

Install OpenSSH via Powershell Admin:
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Install OpenSSH on older Windows 10 prior version 10.1809:
Download https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v7.9.0.0p1-Beta
Unpack to c:\Program Files\OpenSSH
Run Powershell as an Administrator:
Set-Location "C:\Program Files\OpenSSH"
.\install-sshd.ps1

Install SSH key:

type .\.ssh\id_ecdsa.pub
ssh target@win10pc
copy con \ProgramData\ssh\administrators_authorized_keys
icacls.exe \ProgramData\ssh\administrators_authorized_keys /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"

Sources:
– https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement
– https://docs.plm.automation.siemens.com/content/polarion/19.3/help/en_US/polarion_linux_installation/configure_ole_object_support_and_attachment_preview_generator/install_openssh.html