5

I would like to install the Microsoft-provided OpenSSH client for Windows 10 on machines that do not have internet access.

Typically the instructions for installing the OpenSSH client involve running a command like this in PowerShell:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Or alternatively using the DISM tool in a command prompt:

dism /Online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0

However, I have found that these commands only work if the machine has internet access, which makes sense since each command uses the 'Online' switch. The existence of the 'Online' switch makes me think that there might be a way to perform the installation offline. Such an offline installation would probably require files to be downloaded and placed on the machines, which Add-WindowsCapability or DISM.exe knows how to use.

Is it possible to install the OpenSSH client without internet access?

millinon
  • 171
  • 1
  • 2
  • 7

4 Answers4

2

If you are willing to accept a sort of manual and hacky way, it is possible to download their official releases, extract the binaries and add them to your PATH environment variable.

wlnirvana
  • 121
  • 4
1

From: Secure Infrastructure Blog by the Secure Infrastructure team at Microsoft

Offline installation of OpenSSH Server on Windows Server 2019

For this work around you will need both the Windows Server 2019 Features On Demand disc and the Windows 10 Features On Demand disc. Once you have both discs / ISOs downloaded follow these simple steps.

Extract the entire Windows Server 2019 Features On Demand ISO to a local directory on the server (e.g. C:\FOD). Open up the Windows 10 Features On Demand ISO and copy the following cab files to the directory with the extracted Windows Server 2019 Features On Demand files. OpenSSH-Client-Package~31bf3856ad364e35~amd64~~.cab OpenSSH-Server-Package~31bf3856ad364e35~amd64~~.cab Run the Add-WindowsCapability -online -name OpenSSH.Server~~~~0.0.1.0 -source C:\FOD You will then see the following output:

Add-WindowsCapability -Name OpenSSH.Server~~~~0.0.1.0 -Online -Source c:\FOD

Path :
Online : True
RestartNeeded : False

Now OpenSSH Server is installed on the server in an offline environment you will be able to see the OpenSSH SSH Server service.

Igal Serban
  • 1,575
  • 10
  • 6
1

I know this is a very old post. But in case anyone is still finding it, there is now a very easy way to install the SSH server offline.

Download the latest msi from Microsoft's github. The latest when I wrote this was OpenSSH-Win64-v8.9.1.0.msi.

https://github.com/PowerShell/Win32-OpenSSH/releases/

Stripy42
  • 11
  • 1
1

The Add-WindowsCapability cmdlet does have a method for installing from a local package file. I've copied the example from the link here. The key is the -Source parameter which should point to the location of the CAB file containing the windows feature to be installed.

Add-WindowsCapability -Online -Name "Msix.PackagingTool.Driver~~~~0.0.1.0" -Source "E:\" -LimitAccess

In order to obtain a CAB file you will need to first get the Windows FOD (Feature-On-Demand) ISO and extract the necessary package from within.

P.S. The -Online flag is used when installing into a live OS, and does not refer to an active internet connection.

naugler
  • 111
  • 2