Using PowerShell, install OpenSSH on Windows Server 2023

by | Feb 5, 2023 | Uncategorized

A collection of security tools called OpenSSH (OpenBSD Secure Shell) is based on the Secure Shell protocol. In a client-server design, it serves as a secure route over an insecure network initially. As a free version of Tatu Ylönen’s SSH programme, OpenSSH first appeared. The OpenBSD operating system currently under development includes OpenSSH, which was first made available in 1999. The entire suite is not a single computer application, but rather a collection of programmes that stand in for open protocols like Telnet and FTP. It is included in a number of operating systems (Microsoft Windows, macOS, and most Linux Os). A portable version should be available for different systems.

Installing an SSH server and client is possible on Windows Server 2019 and the most recent build of Windows 10. most of us operate with a variety of systems. We are only accustomed to using SSH to access a server or device in order to carry out administrative activities. You can utilise other remote connections as the default method to remotely connect to your server, regardless of whether it’s nearby or running in Azure, as it is now more readily available and simpler to configure. Instead of using another way, I’m using SSH.


  • A Windows Server 2019 or 2022 server should be installed at 99RDP.
  • Utilize RDP to connect to the server.

GUI Installation of OpenSSH

  • Click Settings in the Windows Start menu.
  • Search for Apps and select it.
  • Find and open Manage Optional Features on the Windows Server 2019 Apps and Features tab.
  • To add a feature, select it.
  • Look for and install the OpenSSH Server functionality.
  • Once installed, it will appear under the Manage Optional Feature tab where you may check the status of the installation.

PowerShell Installation of OpenSSH

  • Launch PowerShell as an administrator.
  • To add the OpenSSH capability to the Windows server, type the supplied command. It will output what was marked.
  • Start the OpenSSH service and give it permission to start automatically after it returns the Installed output. Additionally, a script is being run to open local port 22 for OpenSSH.

sshd: Start-Service

Set-Service sshd with the startup type set to “automatic”

Write-Output “Firewall Rule ‘OpenSSH-Server-In-TCP’ does not exist, generating it. If (!(Get-NetFirewallRule -Name “OpenSSH-Server-In-TCP” -ErrorAction SilentlyContinue | Select-Object Name, Enabled))” OpenSSH Server In TCP -Name -DisplayName -OpenSSH Server (sshd) -New-NetFirewallRule -Enabled True -LocalPort 22 -Inbound -TCP Protocol -Allow Action else “Firewall rule ‘OpenSSH-Server-In-TCP’ has been created and exists,” writes Write-Output. }


The fact Your Windows server 2019 is configured with the OpenSSH service. Now connect to the server using any SSH client programme. Let’s use the provided Powershell command to establish a connection to the server. Once you enter the password, OpenSSH will connect you to your Windows server. If you have any problems, get in touch with our help.

ssh username@

Read Our Next Articles Linux Mint 21 Desktop Installation