Skip to content

Setup OpenSSH Server on a Windows Server #

  • Used for:
    • Common uses of SSH
  • Applies to:
    • Windows Server 2016 before 1709 2
    • Windows Server 2012 and below

Commands 1 #

  1. Download the latest release from the PowerShell GitHub

  2. Extract to a folder like C:\Program Files\OpenSSH

  3. On an elevated PowerShell terminal

    1
    2
    3
    4
    5
    powershell -ExecutionPolicy Bypass
    cd "\Program Files\OpenSSH"
    .\install-sshd.ps1
    .\ssh-keygen.exe -A
    New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH
    


Last update: February 20, 2021