Run this in PowerShell as Admin:
New-NetFirewallRule -Name sshd -DisplayName "OpenSSH Server" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22New-NetFirewallRule -Name ICMPAllow -DisplayName "Allow ICMPv4-In" -Protocol ICMPv4 -IcmpType 8 -Direction Inbound -Action AllowGet-Service sshdnetstat -an | findstr :22You should see something like:
TCP 0.0.0.0:22 0.0.0.0:0 LISTENING
If the network is set to Public, Windows firewall blocks incoming connections by default.
- Go to Settings > Network & Internet > Ethernet or Wi-Fi
- Click your network
- Set Network profile to Private
On the remote machine:
ping 192.168.1.100
ssh username@192.168.1.100If still no luck, run:
telnet 192.168.1.100 22If connection fails, it confirms port 22 is blocked or unreachable.