1. Home
  2. Cloud and Servers
  3. Windows server
  4. Installing OpenSSH on Windows Server 2019

Installing OpenSSH on Windows Server 2019

Operating system Microsoft Windows Server 2019 is the first from the Windows branch that brings Secure Shell (SSH) as an optional feature. SSH needs no introduction especially to the administrators of Linux distribution. Thanks to the arrival on Windows, managing heterogeneous environments becomes easier and more efficient.

Installation

OpenSSH for Windows Server 2019 is not a part of the basic installation, so it is necessary to install it manually. Installation is via PowerShell and is fairly easy and it requires to run commands as administrator. First we check the available application:

# Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

Installing the client

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

Installation of the server

# Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Running server and setting the automatic server start up.

# Start-Service sshd
# Set-Service -Name sshd -StartupType 'Automatic'

Enabling in firewall

# Get-NetFirewallRule -Name *ssh*

In the system there is a support for ssh-agent even for generating keys Ssh-keygen.
More information can be found in the official documentation docs.microsoft.com.

Updated on January 3, 2025

Was this article helpful?

Related Articles