How To Enable SSH On Windows Server 2019

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

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

Since then, the OpenSSH is available on Windows Server all we need to do in enable it and configure it.

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

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, I will 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, I will start the OpenSSH services using the command below.

Get-Service ssh* | Start-Service

Connect to Windows Server 2019 using SSH

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

Using the command below, I will connect to my Server and use the same username and password I use when I 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.