Difference between revisions of "Ssh server on windows 11"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' winget install Microsoft.OpenSSH.Beta netstat -an | findstr LISTEN | findstr 22 New-NetFirewallRule -...")
(No difference)

Revision as of 20:55, 19 April 2023

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