Ssh server on windows 11

From UVOO Tech Wiki
Revision as of 20:55, 19 April 2023 by Busk (talk | contribs) (Created page with "``` Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' winget install Microsoft.OpenSSH.Beta netstat -an | findstr LISTEN | findstr 22 New-NetFirewallRule -...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'

winget install Microsoft.OpenSSH.Beta

netstat -an | findstr LISTEN | findstr 22

New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
or
netsh advfirewall firewall add rule name=”SSHD service” dir=in action=allow protocol=TCP localport=22