SSH on Windows Server 2019

Hello all from PFE Land! I'm Allen Sudbring, PFE in the Central Region. Today I'm going to talk about the built in SSH server that can be added to 2019. With previous versions of server, there was some detailed configuration and installs you needed to do, to get SSH working on a . With 2019, it has become much easier. Here are the steps to install, configure, and test:

  1. Open a PowerShell window on the Server you wish to install at:

  2. Run the following command to install the SSH server components:

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

  3. The install opens the port and configures the service. Last step is start both SSH services with the following command and set them to automatic:

    Set-Service sshd -StartupType Automatic

    Set-Service ssh-agent -StartupType Automatic

    Start-Service sshd

    Start-Service ssh-agent

  4. Test with SSH client. I used Ubuntu installed on Windows 10 WSL. The format for server on domain to connect is upn of the login account @servername, as in:


  • For servers in a workgroup, use a local admin account@servername as in:

ssh AzureVMAdmin@servername

5. After you login, you receive a command prompt where you can proceed with CMD or open PowerShell:


OpenSSH gives you the ability to connect to your windows servers without remote PowerShell and get a full CMD and PowerShell Experience. The ability to connect to Windows machines from with a remote CMD shell is also useful in mixed environments.

In case you're asking, you also can do the opposite way, and install PowerShell on and remote to a PowerShell Instance on a Machine with PowerShell Core on a Window Machine, but that is for a later post…

Thanks for reading!


This article was originally published by Clustering For Mere Mortals. You can find the original article here.