2

Is it possible to install OpenSSH entirely using the cmd/terminal? All of the solutions I'm finding on Google require navigating to the Settings app:

https://winaero.com/blog/wp-content/uploads/2017/12/Windows-10-install-SSH-server.png

user522565
  • 21
  • 1

1 Answers1

4

On a sufficiently recent Windows 10 system this works

PS > Add-WindowsCapability -Online -Name 'OpenSSH.Client~~~~0.0.1.0'

Path          :
Online        : True
RestartNeeded : False

To check the status use this

PS > Get-WindowsCapability -Online | ? {$_.Name  -like '*ssh*' }

Name  : OpenSSH.Client~~~~0.0.1.0
State : Installed

Name  : OpenSSH.Server~~~~0.0.1.0
State : NotPresent

You could also install via chocolatey

# https://chocolatey.org/packages/openssh

PS > choco install openssh

If you really want lots of control you can also download the release directly from github and manually install things. There is an ansible role that installs using the manual method that you could probably reverse engineer if you wanted to figure it out for some other system.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
  • 2
    Here's the official Microsoft documentation on these commands: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse – B00TK1D May 08 '19 at 02:32