Using SSH under Windows 10 is much easier than with earlier versions of the system. We show you how it works.
Secure Shell or “SSH” for short is an almost indispensable tool not only for network administrators. The ability to access a computer via a securely encrypted connection and to perform administrative tasks from the command line is commonplace, especially in the Unix/Linux world. Of course, not everyone has a Linux server in operation, which is remotely controlled via SSH. But with the popular single-board computer Raspberry Pi and the Linux systems running on it, remote access via command line has become acceptable.
Even though programs like Putty can still score points in terms of comfort: Under Windows 10 you can establish an SSH connection without any extra tools
A Linux computer can be brought up to date via the Secure Shell, for example via apt. File transfers between SSH client and host are also possible. The good news: Unlike a few years ago, at least access to an SSH server under Windows 10 works directly from the factory. Microsoft already integrated an SSH client into the system with the 2017 update to Windows 10 version 1709. This means that you no longer have to resort to alternative programs such as the open source tool Putty to use SSH functions under Windows. In the following we will show you how to use the SSH client of Windows 10.
How to use SSH on Windows 10
In recent years, Microsoft has opened up to the open source projects once frowned upon in Redmond. This can be seen, among other things, in the fact that Windows developers are increasingly pushing an implementation of OpenSSH in Windows 10. In the current Windows 10 1809, the October-2018 update of the system, an OpenSSH client is firmly integrated into the system. This allows you to connect to a Raspberry Pi, for example, if you have prepared it for SSH operation beforehand.
Open either the command prompt or the Windows PowerShell from the start menu. Now simply enter the command
to see the syntax of the SSH command. If you already know SSH from Linux or macOS, you won’t have to get used to it under Windows 10.
Basically, connecting to a server via SSH works the same way you might already know it from Linux or macOS. To connect to an SSH server, enter the following command:
Where “pi” is the user name with which you log on to the remote server. The server in this case is “raspberrypi”. Depending on the configuration, it can also be an IP address in your network or an external server, for example
The encryption of SSH is based on the exchange of keys. Therefore, the first time you connect to a new server, you will be asked to confirm the key by entering “Yes”. If you have set up the SSH server yourself (e.g. the Raspberry Pi), you can answer this question with a clear yes. Now enter the password of the selected user. Once the connection is established, you can execute all terminal commands via SSH.
Thanks to SSH, you can also remotely maintain a Linux computer under Windows 10, for example a Raspberry Pi.
One more note: By default, the SSH client uses port 22 to connect to the SSH server. If the server uses a different port, you must enter it when connecting. To do this, use the “-p” switch followed by the port. For example, if the port is “7200”, establish the SSH connection in the following way:
ssh pi@raspberrypi -p 7200
SSH server under Windows 10 – is that possible?
On Linux systems, an SSH server, as already shown, is part of good manners. With the implementation of OpenSSH in Windows, Microsoft does not only want to offer an SSH client, but also the possibility to start an SSH server on Windows. Unlike the OpenSSH client, you have to manually activate the SSH server in the current Windows 10 1809. To do so, open System Preferences and navigate to the “Apps & Features” section. Then click on “Optional Features”. Here you click on “Add Features”, select the entry “OpenSSH Server” in the list and go to “Install”.
You can install the SSH server via the Windows 10 system settings
Unfortunately, the implementation of the OpenSSH server on Windows is currently anything but mature. On our test computer, for example, error messages kept appearing while generating SSH keys. For this reason we could not establish an SSH connection to our Windows 10 installation. In this article in the MSDN, Microsoft provides instructions for the setup, but explicitly points out the beta status.
In short: Currently, operating an SSH server under Windows 10 is a complicated matter. However, we assume that Microsoft will continue to expand the implementation of SSH in the system in the coming years. It is possible that the next edition of Windows 10, expected in spring 2019, could already provide a more convenient solution.