[Windows] Enable Windows default SSH server
This topic is already well documented by mircosoft docs. You can find it from Get started with OpenSSH. Here I just want to give two tips for accelerating the setup. There are two ways to activate the open ssh server on Windows: from Windows Settings or PowerShell. Personally, I would recommend to use the PowerShell. Open the PowerShell as an Administrator. Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' # Install server Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 # Start the sshd service Start-Service sshd # OPTIONAL but recommended: Set-Service -Name sshd -StartupType 'Automatic' # Confirm the Firewall rule is configured. It should be created automatically by setup. Run the following to verify if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) { Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..." New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 } else { Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' has been created and exists." } When you try to connect the OpenSSH server, you’ll need to use ssh username@servername. The servername is your device’s IP address. For example, 192.168.1.5. The username may confuse you. But you can find it by typing whoami in PowerShell or Command. It may look like laptop-nbgksu9c\user. In the ~/.ssh/config file, you can configure it like ...