Skip to content

Building OpenSSH for Windows (using LibreSSL crypto)

Tess Gauthier edited this page Mar 27, 2023 · 14 revisions

Download Latest Source

Building OpenSSH for Windows Using Visual Studio, 2015 or newer [Recommended]

  • Download and Install VS 2015, or newer, with Desktop Development with C++ - latest install here
    • Confirm the Desktop Development with C++ Kit was installed properly by checking ${env:ProgramFiles(x86)}\Microsoft Visual Studio\*\*\VC\Auxiliary\Build for a vcvarsall.bat file, as shown in the image below: C++ Development Kit Folder Location
  • Install Windows SDK 10.0.17763.0 during Visual Studio install, or download from here
    • Confirm the SDK was installed properly by checking ${env:ProgramFiles(x86)}\Windows Kits\10\Bin for a 10.0.17763.0 folder, as shown in the image below: Windows 10 SDK Folder Location
  • Install Microsoft Build Tools 2015 during Visual Studio install, or download from here. Note, Build Tools 2015 are needed regardless of the Visual Studio version installed
    • Confirm the Build Tools were installed properly by checking ${env:ProgramFiles(x86)}\MSBuild\Microsoft.Cpp\v4.0\140 for a Microsoft.Cpp.Default.Props file, as shown in the image below: Microsoft Build Tools 2015 Folder Location
  • Open "contrib\win32\openssh\Win32-OpenSSH.sln" in Visual Studio, ensure platform toolset is set to "no upgrade" and Windows SDK is set to "10.0.17763.0" as shown in the image below:
    Visual Studio Initial Solution Settings
  • If necessary, change the configuration and architecture from the middle toolbar
  • Build the Win32-OpenSSH binaries
    • Binaries will be in a .\bin\{Architecture}\{Configuration} folder, as shown in the image below for an x64, Debug build: OpenSSH Binaries Folder Location

Building OpenSSH for Windows Using Build Script

In Powershell:

  • cd repository-root
  • ipmo .\contrib\win32\openssh\OpenSSHBuildHelper.psm1 -Force
  • Start-OpenSSHBuild -Configuration <Release|Debug> -NativeHostArch <x64|x86>

Deploying OpenSSH for Windows

  • Start-OpenSSHPackage -Configuration <Release|Debug> -NativeHostArch <x64|x86>
  • Above generates Zipped binary and symbols payload. Follow further installation instructions here.
Clone this wiki locally