How to Enable SSH Commands in Windows
After the 1809 update, Windows has been offering its users native SSH tools such as a pre-installed SSH client and an optional SSH server. This mean that in Windows 11, you do not need any third-party software to access your computer or server remotely.
Step 1: Enable SSH client:¶
-
Open "Settings" > "Apps" > "Optional Features" and check if the OpenSSH client is installed - if needed, install it via "Add optional feature"
-
Open command prompt as administrator with Windows search > "cmd.exe" > "Run as administrator"
-
Enter CMD command:
ssh
-
Connect to the desired server with
ssh name@server
Step 2: Enable SSH server:¶
In order to also set up an SSH server in Windows 11, you’ll need to install the OpenSSH server of Windows 11. Unlike the SSH client, this is not pre-installed.
-
Open "Settings" > "Apps" > "Optional Features"
-
Click "Add optional features" and select "OpenSSH Server", then "Install" (only possible with admin rights)
-
Open the "Services" app in Windows and set the startup type for "OpenSSH Authentication Agent" and "OpenSSH Server" to "Automatic"
-
Check firewall rules in the Run dialog with
Get-NetFirewallRule -Name *SSH*
. -
Connect to the SSH server by typing
ssh <server_name>
.