Embedded Files

2025_Sept:

SSH windows pc with Linux for remote control in the same networks
This guide explains how to enable SSH on a Windows PC and connect to it from a Linux machine over the same network.


1. Install OpenSSH Server on Windows


Get-WindowsCapability -Online | ? Name -like 'OpenSSH.Server*'


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


2. Start and Enable the SSH Service

Run the following commands in PowerShell (Admin):

Start-Service sshd

Set-Service -Name sshd -StartupType Automatic

Verify service is running:

Get-Service sshd

Expected output:

Status   Name               DisplayName------   ----               -----------Running  sshd               OpenSSH SSH Server

3. Allow SSH in Windows Firewall

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

Expected output:

Name        : sshdDisplayName : OpenSSH Server (sshd)Enabled     : TrueDirection   : InboundAction      : AllowLocalPort   : 22

4. Get Your Windows IP and Username


5. Connect from Linux

On Linux, open a terminal:

ssh "jimmy majumder"@xxx.xxx.xx.xx

(or escape the space)

ssh jimmy\ majumder@xxx.xxx.xx.xx

Enter your Windows account password → login succeeds.


6. Verify Connection

Example successful login:

Microsoft Windows [Version 10.0.19045.6216](c) Microsoft Corporation. All rights reserved.
jimmy majumder@DESKTOP-VLPKKG7 C:\Users\Jimmy Majumder>

You can now run Windows commands (dir, systeminfo, tasklist) remotely.


With this setup, your Windows PC is now a fully functional SSH server accessible from your Linux machine.


Google Sites
Report abuse