Download Latest Source
- git clone https://github.com/PowerShell/openssh-portable
- git checkout latestw_all
Building OpenSSH for Windows Using Visual Studio [Recommended]
-
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 Desktop Development with C++ Kit was installed properly by checking
${env:ProgramFiles}\Microsoft Visual Studio\*\*\VC\Auxiliary\Build
for avcvarsall.bat
file, as shown in the image below:
-
-
Install Windows SDK 10.0.22621.0 during Visual Studio install, or download from here
-
Confirm the Build Tools were installed properly by checking
${env:ProgramFiles}\Microsoft Visual Studio\2022\*\MSBuild\Microsoft\VC\v170
for aMicrosoft.Cpp.Default.Props
file, as shown in the image below: -
Open
contrib\win32\openssh\Win32-OpenSSH.sln
in 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.dll
needs to be copied from\contrib\win32\openssh\libressl\bin\desktop\{Architecture}\
to.\bin\{Architecture}\{Configuration}
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|ARM|ARM64>
Deploying OpenSSH for Windows
- Start-OpenSSHPackage -Configuration <Release|Debug> -NativeHostArch <x64|x86|ARM|ARM64>
- Above generates Zipped binary and symbols payload. Follow further installation instructions here.
Manuals
Installation
- MSI Install Instructions
- Script Install Instructions
- Alternative installation using the universal installer
- Retrieving download links for the latest packages
Usage
- SSH Usage Examples
- SFTP Usage Examples
- Using Certificate Authentication
- Fix SSH file permissions
- Info on SSH remote sessions on Windows
- TTY PTY support
- Troubleshooting