How To Enable SSH On Windows Server 2019

In this blog post, I will show you how to enable SSH on Windows Server 2019 and connect to it using SSH.

Two years ago during the release of 1709, Microsoft announced that it would integrate OpenSSH on Windows Server.

Since then, the OpenSSH has been available on Windows Server, and what we need to do is enable it and configure it.

Below, you will see how I enable and configure it using a few PowerShell commands.

Install OpenSSH

The first step in this process is to enable OpenSSH on the server using the PowerShell command below:

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

After enabling OpenSSH, you will then set the OpenSSH services to start automatically using the two commands below:

Set-Service -Name ssh-agent -StartupType 'Automatic'
Set-Service -Name sshd -StartupType 'Automatic'

And finally, start the OpenSSH services using the command below.

Get-Service ssh* | Start-Service

Connect to Windows Server 2019 using SSH

Now, that you have your OpenSSH services running all you need to do is comment to your Windows Server 2019 using SSH,

Using the command below, you will connect to your server and use the same username and password you use when you RDP to it.

ssh vadmin@

If you have a firewall between your server, make sure you enable SSH traffic to the server.

In my case, both the server and client are on the same network without a firewall in between.