If you have ever wanted to remotely access your Windows computer, run commands from another device, or securely transfer files, installing an SSH server is the way to go. On modern systems like Windows 11, this is easier than ever thanks to built-in support for OpenSSH Server.
SSH, which stands for “Secure Shell”, is a network protocol that allows secure communication between devices. Developers, system administrators, and even home users rely on it for remote management. The best part is that you no longer need external tools. Everything is already built into Windows 11.
This guide walks you through the complete process step by step, including installation and configuration using PowerShell, so you can get everything running smoothly.
How to Install OpenSSH Server on Windows 11?

To install OpenSSH Server on Windows 11, open Settings, go to Optional Features, install the OpenSSH Server feature, then start the SSH service and configure it using Services or PowerShell. Finally, allow port 22 through the firewall to enable remote access.
Let’s go step by step so you can set everything up without confusion.
Step 1: Open Settings and Access Optional Features
Start by opening the Settings app from the Start menu. Navigate to “Apps” and then select “Optional Features”.
This section contains additional components that can be installed on your system. Look for the option labeled “Add an optional feature” and click on it to proceed.
Step 2: Install OpenSSH Server
In the list of available features, search for “OpenSSH Server”. Select it, click “Next”, and then choose “Install”.
Windows will automatically install the feature. This process usually completes within a couple of minutes and does not require a system restart.
Step 3: Verify Installation Using PowerShell
Once installed, it is important to confirm that everything is in place.
Open PowerShell as an administrator and run the following command:
Get-WindowsCapability -Online | Where-Object Name -like ‘OpenSSH.Server*’
If the result shows “Installed”, your system is ready for the next step.
Step 4: Start and Enable the SSH Service
Now you need to start the SSH service.
Open the Services panel by typing “services.msc” in the Run dialog. Locate “OpenSSH SSH Server”, open its properties, and click “Start”.
Set the startup type to “Automatic” so the service runs every time your computer boots.
Step 5: Allow SSH Through Firewall
To ensure remote connections work, you must allow SSH through the firewall.
Go to Windows Defender Firewall settings and allow “OpenSSH Server” for both private and public networks. If it is not listed, create a manual inbound rule for port 22.
Without this step, connections from other devices will be blocked.
Step 6: Find Your System IP Address
Open Command Prompt or PowerShell and type:
ipconfig
Locate your IPv4 address under your active network connection. This is the address you will use when connecting remotely.
Step 7: Test the SSH Connection
From another device, open a terminal and run:
ssh username@your-ip-address
Enter your Windows credentials when prompted. If everything is set up correctly, you will gain remote access to your system.
Configure OpenSSH Server on Windows 11 Using PowerShell
Install OpenSSH Server Using PowerShell
Instead of using the Settings app, you can install OpenSSH Server directly via PowerShell.
Open PowerShell as administrator and run:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
This command installs the SSH server feature instantly without navigating through menus.
Start and Configure SSH Service via PowerShell
To start the SSH service, run:
Start-Service sshd
To ensure it starts automatically on boot, use:
Set-Service -Name sshd -StartupType ‘Automatic’
These commands give you full control over the service without opening the Services panel.
Configure Firewall Rule Using PowerShell
You can also allow SSH through the firewall using PowerShell:
New-NetFirewallRule -Name sshd -DisplayName ‘OpenSSH Server’ -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
This command creates a rule that allows incoming SSH connections on port 22.
Check SSH Service Status
To verify that everything is running correctly, use:
Get-Service sshd
If the status shows “Running”, your SSH server is active and ready to accept connections.
Restart SSH Service After Changes
Whenever you make changes to the configuration file, restart the service using:
Restart-Service sshd
This ensures all updates take effect immediately.
Faqs
What is OpenSSH Server used for?
OpenSSH Server enables secure remote access to your computer, allowing you to run commands and manage files from another device.
Can I install OpenSSH Server without Settings?
Yes, you can install and configure it entirely using PowerShell commands, which is faster and more efficient.
Is PowerShell better for managing SSH?
PowerShell offers more control and is ideal for automation, especially if you manage multiple systems.
What port does SSH use by default?
SSH uses port 22 by default, but you can change it in the configuration file for added security.
Why is my SSH service not starting
This could be due to a missing installation, incorrect permissions, or conflicts with firewall settings. Verifying each step usually resolves the issue.