If you plan to install OpenSSH server in Windows 11, this article will tell you how to do it.
SSH is a protocol. It allows you to remotely connect to a computer and execute commands on it over an encrypted connection. We call this a “shell” because it provides a secure environment for remote management.
OpenSSH is an open-source variant of the SSH protocol that can be used by everyone. OpenSSH is available as a server in Windows 11 to install. This is useful if you use Windows 11 as a server environment, a web server for example.
Install OpenSSH server in Windows 11
Right-click on the Start button. In the menu click on “settings”. In the settings, click on “apps”.
Because OpenSSH is an optional feature in Windows 11, click on “optional features”.
Click on “show features” to add an optional component.
Search for “openssh” in the search field and click “OpenSSH server”. Click next to proceed to installation.
Confirm again by clicking “install”.
OpenSSH server is then installed in Windows 11.
After installation, you will need to make changes to the configuration file for OpenSSH. This “openssh_config” configuration file can be found at the following hidden location:
C:\ProgramData\ssh
However, before any files are stored here, the SSH service must first be started. Right-click on the Start button. Click “run” in the menu. In the run window type: services.msc
In the list of services, search for:
- OpenSSH SSH Server (abbreviated: sshd)
- OpenSSH Authentication Agent (abbreviated: ssh-agent)
Start both services and, if necessary, change the service status to automatic so that they are started when you log in to Windows 11.
You can now edit the “sshd_config” file in the location mentioned earlier. If you make any adjustments to this, you will need to restart the services.
If everything is properly installed and configured, you can use the netstat command:
netstat -nao
check if port “22” is open on “localhost”. Possible exceptions in the Windows or external firewall must be configured to remotely access port 22 SSH.
I hope this helped you. Thank you for reading!