Turn your PC into an SSH client and server using only Windows

Precisely because of all this that we are discussing, on certain occasions the use of these connections can present certain risks that we can alleviate. This is something that we will talk about next, in addition to seeing some alternative programs that we can use to increase security and privacy when carrying out these tasks.

Activate OpenSSH server and client

Although the process is very similar in the two Microsoft operating systems, below, we are going to explain, step by step, how we can activate this server in both Windows 10 and Windows 11 so that we can use these secure remote connections without problems in both. systems.

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 so without problems. These features are optional as not all users may need them, therefore we will have to manually enable them in order to use them.

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

Here we are going to see the section of optional features of Windows. We will be able to 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«.

We will see all the functions and optional features that Windows offers us. The ones we are interested in are the SSH client and server. We can search for them by hand, but the fastest way is to write «SSH» in the browser to quickly find both the server and the client.

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

In Windows 11

Since the first version of Windows 11 we can find these packages within the list of optional programs and features of the operating system. But, as in its predecessor, it is disabled by default. To activate this function, the first thing we will do is go to the “Optional Features” section of this version of Windows. To do this, we open the Settings menu with the Windows + I shortcut, and we go to the Applications> Optional Features section. Here, what we will do is click on the blue “View features” button to add a new optional feature.

We will be able to see a search engine like the following, in which we will have to look for “SSH” to be able to install the server and the client, in case we do not already have them installed.

See also  Fix iCloud sync issues on Windows

We check the box, click “Next” and start installing this optional feature. The process will take a few seconds, and when we have it ready we can start using it.

How to uninstall them

If there comes a time when we no longer need this client or this server, then we can 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 prevent someone from being able to connect to our PC remotely by mistake.

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 the server, and uninstall them individually.

In case we are Windows 11 users, the uninstall process is very similar to that of Windows 10. We must go to the same section that we saw in the previous point, the optional features, and use the search engine to find the features related to the SSH. We select the one we want and from there we can uninstall it now.

When the uninstall is complete, on either system, these services will no longer be available.

Activate the service

It is possible that we have installed everything necessary to be able to use the SSH protocol in Windows but, at the moment of truth, it does not work directly. This may be because the services necessary to be able to use this protocol are disabled in Windows.

To solve it, the first thing we will do is open the execution window with the Windows + R shortcut, and write “services.msc” in it. In the window that appears we have to look for two different services:

  • OpenSSH Authentication Agent
  • OpenSSH SSH Server

We double click on each of these entries, and surely we will see that it is disabled. We simply open the list of options that we find here and choose the “Automatic” option.

We apply the changes, accept and that’s it. The SSH services will already be up and running, and now we will be able to use this protocol without problems, both in client mode and in server mode.

Connect to an SSH server from Windows

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

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

See also  Format and partition hard drives

In case you want to use the last available user:

ssh server_ip:port

In case you want to connect with a specific user:

ssh user@IP:port

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 encryption, certificates, etc.

Obtain the IP of the equipment to act as a server

Among the many tasks that we can carry out with this type of SSH connection that we are talking about, is to turn our computer into a server for others. This is something that we can carry out after carrying out the configurations mentioned before, through client programs such as Putty, which we will talk about below. However, first of all we must take into consideration that, if our computer is going to become a server, certain data will be needed to correctly configure the corresponding clients.

For example, when configuring these client programs to access our equipment, they will necessarily need the IP address of the computer that acts as the server, in this case ours. For this we can use the command ipconfig that we can execute in a simple way from a command prompt window. We can also make use of other external platforms such as this website (), to obtain our IP address in the easiest way.

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 GUI applications that allow us to do this, but we recommend using PowerShell commands to control the state 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 check that port 22, the one for SSH, is open in our firewall we must do it with the command:

  • Get-NetFirewallRule -Name *ssh*

Connection issues?

If we cannot make the connection, the problem is most likely related to the ports used to access our equipment, so we must check via hardware and software if they are open or closed.

Create a rule on the firewall

It may happen that we are trying to connect remotely to our PC through SSH and that there is something blocking the connection attempts. Most likely it is the Windows firewall itself, since, by default, it blocks port 22 (used by this protocol) and the protocol as such to avoid unnecessary security risks.

To avoid this, and be able to connect without problems, it is necessary to create a new rule. To do this, we only have to open a PowerShell window, with Administrator permissions, and execute the following command:

New-NetFirewallRule -Name sshd -DisplayName ‘OpenSSH Server (sshd)’ -Service sshd -Enabled True -Direction Inbound -Protocol TCP -Action Allow -Profile Domain

See also  Access your Windows hard drives from Linux easily

By doing so, we will already have enabled the incoming traffic, via TCP, to use the sshd service. Therefore, we only have to try the connection again to verify that, indeed, it has been possible to carry out successfully.

Check router ports

If we continue to have problems with the access port, in addition to opening the port in the Windows firewall, we must also verify that that port is open on the router. If this is not the case, no matter how much we open it in Windows, if the router has the port blocked, we are going to find the same problem.

To check if our router has that or other ports closed or open, we can use the web, specifically the section that allows us to check if a certain port on our router is open or closed. The web automatically detects our IP, so we will only have to specify the port number, which, in this case, is 22 and click on Begin.

The port is closed on the router, we will first have to find out what our router model is, then look for a tutorial on the internet that shows us how to open ports on that model. If we have some computer knowledge, we can choose to look for the section ports either Port forwarding on the router if it is in English.

Risks when using SSH on Windows

SSH is a very useful tool to be able to connect to the Internet remotely, and also to do it securely. However, we must bear in mind that if we do not do it correctly, we run the risk of putting our system in danger.

One of the most common risks that we can find in the use of SSH on unauthorized servers. Many system administrators often enable mass SSH connections to all computers on the network, without being careful. And that results in anyone being able to access equipment they shouldn’t be able to access.

Another very common problem is use SSH servers without updatingwith vulnerabilities. No matter how secure the connection is, if the server itself has vulnerabilities, we will be putting our computer in danger, opening the door to all kinds of computer attacks.

In addition, it is also common to meet unsafe configurations. Some administrators tend to modify the parameters to facilitate the use and configuration of the server (for example, in OpenSSH) and, almost…

Loading Facebook Comments ...
Loading Disqus Comments ...