How to Enable SSH Server on Windows (Quick Guide)

Categories: Windows

 Windows has a built-in OpenSSH Server. Here's how to set it up in under 2 minutes.

  Prerequisites

  - Windows 10/11
  - Administrator access

  Steps

  1. Open PowerShell as Administrator

  Press Win + X → Click Terminal (Admin)

or search powershell in windows search bar and righ click on "powershell" and click "Run as Administrator"

  2. Install OpenSSH Server

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

  3. Start the SSH Service

  Start-Service sshd

  4. Enable SSH on Startup

  Set-Service -Name sshd -StartupType Automatic

  5. Allow SSH Through Firewall

  netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22

  6. Find Your IP Address

  ipconfig

  Note the IPv4 Address (e.g., 192.168.1.100).

  Connecting via SSH

  From another device:

  ssh username@your-ip-address

  Microsoft Account Users

  If you sign in with a Microsoft account (email), your SSH username is not your email. It's your local user folder name found in C:\Users\. For example, if
   your folder is C:\Users\john, your username is john.

  Use your Microsoft account password (not your PIN) to authenticate.

  ---
  That's it. Your Windows PC is now accessible via SSH.