-
Notifications
You must be signed in to change notification settings - Fork 767
Building OpenSSH for Windows (using LibreSSL crypto)
Tess Gauthier edited this page Feb 24, 2022
·
14 revisions
- git clone https://github.com/PowerShell/openssh-portable
- git checkout latestw_all
- 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\<2015/2017/2019/2022>\<Community/Professional/Enterprise>\VC\Auxiliary\Build
for avcvarsall.bat
file, as shown in the image below:
- Confirm the Desktop Development with C++ Kit was installed properly by checking
- Install Windows SDK 10.0.17663.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 a10.0.17763.0
folder, as shown in the image below: - 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 aMicrosoft.Cpp.Default.Props
file, as shown in the image below:
- Confirm the Build Tools were installed properly by checking
- 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.17663.0" as shown in the image below:
- 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:
- Binaries will be in a
- Confirm the SDK was installed properly by checking
In Powershell:
- cd repository-root
- ipmo .\contrib\win32\openssh\OpenSSHBuildHelper.psm1 -Force
- Start-OpenSSHBuild -Configuration <Release|Debug> -NativeHostArch <x64|x86>
- Start-OpenSSHPackage -Configuration <Release|Debug> -NativeHostArch <x64|x86>
- 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