SSH in Windows 10: How to Activate the Server and Connect as a Client

Although we are generally used to using the computer in graphic mode, there are many tools that allow us to control it through a terminal, both in Linux and Windows. When it comes to remotely controlling a PC, these tools come to the fore for the ease and speed with which we can perform all these tasks. And one of these tools, or rather, a very common protocol that we can use in any operating system, of whatever type, is SSH.

What is SSH

Secure SHell , or SSH, is a protocol used to connect remotely and securely to any computer. This protocol is, broadly speaking, an improved version of Telnet . In addition to encrypting point-to-point connections so that no one can see or intercept them (something that neither Telnet and FTP offer), what we will be able to do with this protocol is:

SSH in Windows 10: How to Activate the Server

  • Connect remotely to any PC and control it through commands.
  • Transfer files safely, both individually and simultaneously.
  • Manage RSA keys so you don’t have to use passwords.
  • Run applications in graphical mode remotely.

This is one of the standard and most widely used protocols when it comes to connecting remotely to servers and other computers, especially Linux. It uses port 22 by default, a port that is always open in firewalls and routers, although we can change it to the port that we want to use.

Activate OpenSSH server and client in Windows 10

Since the Fall Creators Update, Windows 10 brings with it a client and a server based on OpenSSH so that any user who wants to use it can do it without problems. These features are optional, since not all users may need them, therefore we will have to manually enable them in order to use them.

To install the OpenSSH client and / or server in Windows 10 , what we must do is open the Configuration menu of the operating system, and go to the section “Applications> Applications and features> Optional features.

Instalar SSH en Windows 10 - 1

Here we are going to see the section on optional Windows features. We can see all the ones we have installed and enabled in the operating system, and install the ones we need if we don’t already have them. To do this, we will have to click on ” Add a feature “.

Instalar SSH en Windows 10 - 2

We will see all the functions and optional features that Windows 10 offers us. Those that interest us are the SSH client and server. We can search for them by hand, but the fastest way is to type ” SSH ” in the search engine to quickly find both the server and the client.

Instalar SSH en Windows 10 - 3

We select what we want to install, and we accept the window. Windows 10 will automatically install and configure this optional feature so we don’t have to do anything else. When the process is complete, both the server and the client are ready for use in the operating system.

Instalar SSH en Windows 10 - 4

How to uninstall them

If there comes a time when we no longer need this client or this server, then we will be able to disable these optional Windows features. Not to free up space, since between the client and the server they barely reach 30 MB, but rather to have the functions in order and avoid that, due to a mistake, someone can connect to our PC remotely.

We can do this from the same section of optional features above. In the list of installed features we can see everything that we have enabled in the system. We locate the client and / or server, and uninstall them individually.

Instalar SSH en Windows 10 - 5

When the uninstallation is complete, these services will no longer be available.

Connect to an SSH server from Windows 10

OpenSSH is integrated into CMD and PowerShell , so we will not have to download or install any other program to be able to connect to any server from Windows 10. All we have to do is open the terminal window that we are going to use, and execute the “ssh” command to verify that, indeed, the client is enabled.

Instalar SSH en Windows 10 - 6

To connect to an SSH server, what we must do is execute one of the following two commands:

In case you want to use the last available user:

ssh IP_del_servidor:puerto

In case of wanting to connect with a specific user:

ssh usuario@IP:puerto

If we do not specify port, 22 will be used by default.

If we want, we can specify other values in the form of parameters, such as type of ciphers, certificates, etc.

Control OpenSSH server

In order to use the server, the first thing we have to do is start it. This can be done in many ways. For example, there are applications with a GUI that allow us to do this, but we recommend using PowerShell commands to control the status of this server:

  • Get-Service sshd – Check the status of the sshd server.
  • Start-Service sshd – Start the sshd server.
  • Stop-Service sshd – Stop the sshd server.

We can also configure the server from PowerShell to run automatically with the command:

  • Set-Service -Name sshd -StartupType ‘Automatic’

And to verify that port 22, the SSH port, is open in our firewall we must do it with the command:

  • Get-NetFirewallRule -Name * ssh *

Alternatives

Unlike what can happen in Linux, for Windows there are no more SSH servers that we can use to control Windows remotely. There are some programs that allow us to connect to a remote shell, but their functionality is very limited.

What we can find are several SSH clients for Windows that will allow us to connect to servers more easily.

PuTTY, the SSH client par excellence

When we talk about SSH clients, PuTTY is one of the best known. This free and open source client allows Windows and Linux users to connect via Telnet and SSH through an xterm emulator. A very simple and complete program that will allow us to have all the servers centralized and connect to them as we need it.

We can download PuTTY from this link .

KiTTY, an improved version of PuTTY

This is an exclusive client for Windows created from the original PuTTY source code. It has by default all the original functions and features of PuTTY, as well as a large number of additional features that will allow us to control and manage all our connections much better.

We can download KiTTY from this link .