Skip to content

Install Win32 OpenSSH Using MSI

Tess Gauthier edited this page Mar 22, 2022 · 10 revisions

Prerequisites

  1. Win32-OpenSSH Github releases can be installed on Windows 7 and up.
  2. Note these considerations and project scope first.
  3. Download the latest build of OpenSSH, selecting either the 32-bit or 64-bit MSI.

Install Win32-OpenSSH using MSI

1. Run MSI Installer

The MSI must be run in any command prompt (cmd.exe & pwsh.exe both work), as it does not yet have a UI (coming soon).
The MSI will install OpenSSH to the ProgramFiles\OpenSSH folder.
The commands to run, are as follows:

  • To install both the SSH Client & the SSH Server (default behavior)
    msiexec /i <path to openssh.msi>
  • To install only the SSH Client
    msiexec /i <path to openssh.msi> REMOVE=Server
  • To install only the SSH Server
    msiexec /i <path to openssh.msi> REMOVE=Client

Examples:

  • Installing SSH Client & openssh.msi is in the working directory:
    msiexec /i openssh.msi REMOVE=Server
  • Installing SSH Server & openssh.msi is in C:\users\public\downloads:
    msiexec /i C:\users\public\downloads\openssh.msi REMOVE=Client

2. Update SYSTEM PATH (Required for SCP and SFTP)

Append the Win32-OpenSSH install directory to the system path, by running one of following commands.
If using the x86 installer on a 64-bit machine:
setx /M PATH $($Env:PATH + ';' + ${Env:ProgramFiles(x86)} + '\OpenSSH')

All other cases:
setx /M PATH $($Env:PATH + ';' + ${Env:ProgramFiles} + '\OpenSSH')

3. Verify OpenSSH Install

Check the status of the SSH Service.
In PowerShell, run:
Get-Service -Name ssh*

Uninstall Win32-OpenSSH using MSI

Similarly, the command to uninstall Win32-OpenSSH is as follows:
msiexec /x <path to openssh.msi>

Additional Documentation on msiexec

Further information on msi command-line options can be found here

Video recording

Meeting.with.Balu.Gajjala-20220318_145330-Meeting.Recording.mp4
Clone this wiki locally