Secure Shell, or "SSH" for short, is an almost indispensable tool, and not just for network administrators. The ability to access a computer via a securely encrypted connection and to carry out administrative tasks via the command line is especially common in the Unix / Linux world. Of course, not everyone has a Linux server in operation that is controlled remotely via SSH. But with the popular single-board computer Raspberry Pi and the Linux systems running on it, remote access via the command line has become socially acceptable.
With the Secure Shell, a Linux computer can be brought up to date via apt, for example. 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 update to Windows 10 Version 1709, which was released in 2017. You no longer have to resort to alternative programs such as the open source tool Putty to use SSH functions on Windows. In the following, we will show you how you can use the Windows 10 SSH client.
How to use SSH on Windows 10
In recent years, Microsoft has opened up to the open source projects that were once frowned upon in Redmond. This can be seen, among other things, in the fact that Windows developers are pushing ahead with the implementation of OpenSSH in Windows 10. In the current Windows 10 1809, i.e. the October 2018 update of the system, an OpenSSH client is firmly integrated into the system. You can use this to set up a connection to a Raspberry Pi, for example, if you have prepared it beforehand for SSH operation: https://www.heise.de/tipps-tricks/Raspberry-Pi-SSH-einrichtungen-so- geht- s-4190645.html.
To do this, either open the command prompt or Windows PowerShell via the start menu. Now just give the command
ssh
to see the syntax of the SSH command..
Basically, the connection to a server via SSH works in the same way as you may already be familiar with from Linux or macOS. To connect to an SSH server, enter the following command, for example:
ssh pi@raspberrypi
where “pi” is the username with which you log in to the remote server. In this case the server is “raspberrypi”. Depending on the configuration, it can also be an IP address in your network or an external server, for example
ssh [email protected]
SSH encryption is based on the exchange of keys. The first time you connect to a new server, you will be prompted to enter the key by entering “ Yes " to confirm. If you have set up the SSH server yourself (e.g. the mentioned Raspberry Pi), you can answer this question in the affirmative with a clear conscience. Now enter the password of the selected user . As soon as the connection is established, you can execute all terminal commands via SSH.
Another note: The SSH client uses port 22 by default to connect to the SSH server. If the server uses a different port, you must enter this when connecting. To do this, use the “ -p ” switch followed by the port . For example, if it is “ 7200 ”, use the following method to establish the SSH connection:
ssh pi@raspberrypi -p 7200
SSH server under Windows 10 - is that possible?
As already shown, an SSH server is a good form on Linux systems. With the implementation of OpenSSH in Windows, Microsoft does not only want to offer an SSH client, but also the option of starting an SSH server under Windows. Unlike the OpenSSH client, you have to manually activate the SSH server in the current Windows 10 1809. To do this, open the system settings and navigate to the " Apps & Features " section. Then click on " Optional Features ". Here click on “ Add Features ”, select “ OpenSSH Server ” from the list and click “ Install ” ”. Make sure that you are logged on as a user with administrator rights..
Unfortunately, the implementation of the OpenSSH server under Windows is currently anything but mature. On our test computer, for example, there were repeated error messages when generating SSH keys. For this reason we could not establish an SSH connection to our Windows 10 installation. Microsoft provides instructions for setup in this post on MSDN, but explicitly points out the beta status : https://blogs.msdn.microsoft.com/powershell/2017/12/15/using-the-openssh-beta-in -windows-10-fall-creators-update-and-windows-server-1709 /
In short: Operating an SSH server under Windows 10 is currently a complicated matter. However, we assume that Microsoft will continue to expand the implementation of SSH in the system in the coming years. The next edition of Windows 10, expected for spring 2019, could possibly provide a more comfortable solution.