- Notifications
You must be signed in to change notification settings - Fork 801
Building OpenSSH for Windows (using LibreSSL crypto)
- git clone https://github.com/PowerShell/openssh-portable
- git checkout latestw_all
Clone Vcpkg Repository (*required as of September 2025 - see here for more info)
- git clone https://github.com/Microsoft/Vcpkg
- bootstrap Vcpkg with script in repo root:
./bootstrap-vcpkg.bat - integrate with Visual Studio:
./vcpkg.exe integrate install
Download and Install Visual Studio - latest install here.
If using the Visual Studio installer, select the following:
- Desktop Development with C++ Workload
- Windows 11 SDK 10.0.22621.0 Individual Component
- MSVC 143 Build Tool(s) Individual Component(s) - up to 3 depending on which architecture(s) will be built: x86/x64, ARM, ARM64
- MSVC 143 Spectre-Mitigated Lib(s) Individual Component(s) - up to 3 depending on which architecture(s) will be built: x86/x64, ARM, ARM64
Confirm the selections look something like this:

Confirm the Desktop Development with C++ Kit was installed properly by checking
${env:ProgramFiles}\Microsoft Visual Studio\*\*\VC\Auxiliary\Buildfor avcvarsall.batfile, as shown in the image below:
Install Windows SDK 10.0.22621.0 during Visual Studio install, or download from here
- Confirm the SDK was installed properly by checking
${env:ProgramFiles(x86)}\Windows Kits\10\Binfor a10.0.22621.0folder, as shown in the image below:
- Confirm the SDK was installed properly by checking
Confirm the Build Tools were installed properly by checking
${env:ProgramFiles}\Microsoft Visual Studio\2022\*\MSBuild\Microsoft\VC\v170for aMicrosoft.Cpp.Default.Propsfile, as shown in the image below:
Open
contrib\win32\openssh\Win32-OpenSSH.slnin Visual Studio, if prompted ensure platform toolset is set to "no upgrade" and Windows SDK is set to "10.0.22621.0"If necessary, change the configuration and architecture from the middle toolbar
Build the Win32-OpenSSH binaries
Note: after the first build of a configuration & architecture or if a new libcrypto version is being pulled in, the corresponding
libcrypto.dllneeds to be copied from\contrib\win32\openssh\libressl\bin\desktop\{Architecture}\to.\bin\{Architecture}\{Configuration}- Binaries will be in a
\bin\{Architecture}\{Configuration}folder, as shown in the image below for an x64, Debug build:
- Binaries will be in a
In Powershell:
- cd repository-root
- ipmo .\contrib\win32\openssh\OpenSSHBuildHelper.psm1 -Force
- Start-OpenSSHBuild -Configuration <Release|Debug> -NativeHostArch <x64|x86|ARM|ARM64>
- Start-OpenSSHPackage -Configuration <Release|Debug> -NativeHostArch <x64|x86|ARM|ARM64>
- Above generates Zipped binary and symbols payload. Follow further installation instructions here.
- MSI Install Instructions
- Script Install Instructions
- Alternative installation using the universal installer
- Retrieving download links for the latest packages