|

How To Turn On OpenSSH In Windows 11 (2026)

This guide is for anyone who wants to use SSH from Windows 11, either to connect to another computer or to let others connect to theirs.

OpenSSH comes as two optional features, a client and a server, and you only need the one that matches your goal.

Every step below comes from Microsoft’s documentation, and the last section shows how to check that it worked.

Table of Contents

Quick answer: client or server

Your goalInstallThen
Connect from this PC to another machineOpenSSH ClientRun the ssh command
Let another device connect to this PCOpenSSH ServerStart the sshd service and allow port 22
BothClient, then ServerFollow every section below

On Windows 11 both are optional features, so they may not be installed yet.

What you need first

  • Windows 10 build 1809 or later, which includes Windows 11.
  • Windows PowerShell 5.1 or later.
  • An account in the built-in Administrators group.

To check PowerShell, open an elevated PowerShell window and run $PSVersionTable.PSVersion.

Turn on OpenSSH with Optional Features

  1. Select Start, type Optional Features and open it.
  2. Check whether OpenSSH is already listed, and if it is, you can skip to the service section.
  3. If it is not listed, select Add a feature (or Add an optional feature).
  4. Search for OpenSSH Client and install it.
  5. Search for OpenSSH Server and install it as well, if you want others to connect to this PC.

Microsoft installs the client first, then the server, so follow that order.

Turn on OpenSSH with PowerShell

Open PowerShell as administrator and check the current state first.

Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'

A feature that is not installed shows the state NotPresent.

Then install the client, the server or both with these commands.

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

Each command should report Online : True and RestartNeeded : False.

Start the OpenSSH server service

Microsoft notes that the features may not be usable until they are started and configured, so this step matters.

  1. Open Services by typing services.msc in Start.
  2. Double-click OpenSSH SSH Server.
  3. On the General tab, set Startup type to Automatic and select OK.
  4. Select Start.

The PowerShell version is two commands.

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

The automatic startup line is marked optional but recommended in Microsoft’s guide.

Check the firewall rule

Installing the server creates and enables a rule named OpenSSH-Server-In-TCP, which allows inbound TCP port 22.

If that rule is disabled or the port is blocked, connections are refused or reset.

Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP"

If the rule is missing, Microsoft’s troubleshooting page creates it with this command.

New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22

If you only need the client, skip the server, because the server is what opens this port.

For general firewall steps, see our guides to allowing an app through Windows Firewall and turning Windows Firewall on or off.

Connect with ssh

From a Windows device with the OpenSSH client installed, Microsoft’s example is this.

ssh domain\username@servername
  1. On the first connection, confirm the host key fingerprint by typing yes.
  2. Enter your password when asked, and note that no characters appear as you type.
  3. A prompt such as domain\username@SERVERNAME C:\Users\username> means you are connected.

Check that it worked

CheckGood result
Get-WindowsCapability listThe OpenSSH items no longer show NotPresent
Services windowOpenSSH SSH Server shows Running, startup type Automatic
Firewall rule commandThe OpenSSH-Server-In-TCP rule exists and is enabled
ssh to the PC from another deviceYou get the host key prompt, then the password prompt

If the install fails

Microsoft lists the install errors 0x800F0954, 0x800F0950, 0x8024402C, 0x80240438 and 0x8024500C.

It says they appear when the PC is cut off from the internet, has update behavior set by Group Policy, or gets updates from WSUS or another intranet store.

Windows needs .cab files for these features and cannot find them in those cases.

On a PC with normal internet access, run the PowerShell install again and make sure Windows Update can connect.

On a work PC, update behavior is set by your organization, so ask your IT administrator rather than changing it yourself.

Where Windows looks for the OpenSSH files

Microsoft says the default source for optional features differs by Windows version, which explains why the same command works on one PC and fails on another.

Windows versionDefault source for the files
Windows 11 24H2 and laterWindows Update, then WSUS or a network share if Windows Update is unavailable
Windows 11 22H2 through 23H2WSUS
Windows 11 21H2 and Windows 10 2004 through 22H2WSUS, with an option to use Windows Update directly when it is available
Windows 10 1709 through 1809WSUS, with the same option

On a home PC that is not managed by WSUS, this normally means Windows Update does the download.

Microsoft also says that Windows 11 21H2 and 22H2 cannot install these features through WSUS, so an offline PC has to use a network location instead.

For that case it points to a Feature on Demand ISO that matches your exact Windows version and build, installed with dism /online /add-capability.

If the service shows Error 1053

Error 1053 reads “The server did not respond to the start or control request in a timely fashion.”

Microsoft says it happens when the versions of OpenSSH Client, OpenSSH Server and libcrypto.dll do not match.

One cause it lists for Windows 11 and 10 is installing OpenSSH Server from the GitHub packages without installing the matching client.

Its fix for that case is to install the server and client packages together, even if one is already installed.

Turn OpenSSH off

  1. Select Start, type Optional Features and open it.
  2. Select OpenSSH Client or OpenSSH Server.
  3. Select Uninstall.
  4. Restart Windows if the service was running.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *