Skip to content
Follow
Windows

How to Enable OpenSSH Server in Windows 11

Richard
Written by
Richard
Jul 27, 2021 Updated Jun 19, 2026 3 min read
How to Enable OpenSSH Server in Windows 11
How to Enable OpenSSH Server in Windows 11

You enable OpenSSH Server in Windows 11 by installing it as an optional feature.

OpenSSH Server allows you to securely connect to and manage your Windows 11 PC remotely using SSH (Secure Shell), creating an encrypted tunnel for commands and file transfers.

The OpenSSH server feature is not active by default on Windows 11. Users must install the OpenSSH server manually through Windows Settings or by using PowerShell. After installation, a Windows 11 PC can accept secure incoming SSH connections, which is essential for remote administration and access.

⚡ Quick Answer

Install OpenSSH Server via Settings by going to Apps > Optional features, clicking View features, searching for OpenSSH Server, selecting it, and clicking Install. Alternatively, use PowerShell with the command Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0.

How to Install OpenSSH Server

📝Good to Know
You can install this feature using the Settings menu or the command line. Admin privileges are required for these steps.

Method 1Using Windows Settings

1. Press Windows key + I to open Settings.
2. Go to Apps > Optional features.
3. Click View features and search for OpenSSH Server.
4. Select it and click Install.

Windows 11 Start menu showing Settings option
windows 11 start settings
Windows 11 Apps section in Optional Features
widnows 11 apps optional features
Windows 11 interface for adding Optional Features
windows 11 add optional features
OpenSSH Server installation process in Windows 11
openssh server windows 11 install
Completion screen for OpenSSH Server installation
openssh server windows 11 complete install

Method 2Using PowerShell (Fastest Way)

Users can install the OpenSSH server quickly by using PowerShell. Open PowerShell with administrator rights and enter the following command: `Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0`. This command adds the OpenSSH server capability to the Windows 11 system, making remote access possible.

💻Code
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Starting and Managing the Service

You need to start the OpenSSH Server service in Windows 11 to let other devices connect to your PC.

The OpenSSH SSH Server service in Windows 11 allows secure remote login. To start this service, find "OpenSSH SSH Server" in the Services app. Right-click the service name and choose "Start." To make the service start automatically when Windows 11 starts, right-click "OpenSSH SSH Server" again, select "Properties," and then set the "Startup type" to "Automatic."

Windows 11 Services search results for OpenSSH
windows 11 services search results
Starting OpenSSH SSH Server in Windows 11
windows 11 openssh ssh server start

You can verify the status anytime by running Get-Service sshd in PowerShell.

Configuration and Security

The main configuration file is usually found at C:\ProgramData\ssh\sshd_config. You can edit this file to change the default port or restrict access.

How do I change the default SSH port on 🪟 Windows 11?

To change the port, open C:\ProgramData\ssh\sshd_config in a text editor as an administrator. Find the line that says #Port 22, remove the hash (#) symbol, and change 22 to your desired port number. Save the file and restart the OpenSSH SSH Server service in the Services app.

Setting up Key-Based Authentication

Passwords can be guessed. Using an SSH key pair is much safer. You generate a public and private key, then place the public key in C:\Users\username\.ssh\authorized_keys. This allows you to log in without typing a password every time.

Troubleshooting

If you cannot connect, check your Windows Firewall. The installation usually creates a rule, but you may need to ensure port 22 (or your custom port) is open. Use the command netsh advfirewall firewall show rule name=all to verify.

How do I uninstall OpenSSH Server completely?

To uninstall, go to Settings > Apps > Optional features. Find OpenSSH Server in the list of installed features, click the arrow next to it, and select Uninstall. This will remove the service and all associated files from your system.

Summary

Setting up OpenSSH Server on Windows 11 gives you a safe way to control your PC from afar. You can install it through Settings or PowerShell, then just start the service and check your firewall. For better security, use key-based logins instead of passwords.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Disable Command Prompt in Windows 11
Windows How to Disable Command Prompt in Windows 11
How to Set Up SSH Key Authentication in Windows 11
Ubuntu Linux How to Set Up SSH Key Authentication in Windows 11
How to Start, Stop, and Restart Services in Windows 11
Windows How to Start, Stop, and Restart Services in Windows 11
How to Change PowerShell Execution Policies in Windows 11
Windows How to Change PowerShell Execution Policies in Windows 11

0 Comments

  • Hariharan

    how to connect ssh tunnel in cmd?

    Reply
  • It says “Couldn’t install” 🙁 Is there a dependency? A running service maybe?

    Reply
  • hi richard
    what is the accoumd password here?

    Reply
  • EselDompteur

    @melisa the Password is the same as you’ve set at your account on the machine to enter it locally

    Reply

Leave a Comment

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