How to Enable the Built-in OpenSSH in Windows 10
With each new release of Windows 10, more and more useful tools are being brought over from Linux. First, Windows introduced the Linux Subsystem, and now it also includes a built-in OpenSSH client and server using OpenSSH version 7.5.
Although the Windows 10 OpenSSH software is currently in beta, it already works quite well. With the built-in OpenSSH client enabled in Windows 10, you no longer need to use a third-party SSH client (like Putty) to connect to servers via SSH. In this article, I’ll explain how to enable the OpenSSH Client and how to use it.
How to Enable the OpenSSH Client in Windows 10
Installing the OpenSSH client is simple, but it does require restarting your computer.
- Go to Settings → Apps.
- In the “Apps & features” section, click on Manage optional features.
- Click the Add a feature button. This will open a list of additional features you can install. Most of them are font packages, but if you scroll down, you’ll see OpenSSH Client (beta) and OpenSSH Server (beta).
- To install the SSH client or server, simply select it and click Install. Once you click “Install,” the component will disappear from the list. This is normal and nothing to worry about. Just click the back arrow in the top left corner of the window to return to the list of installed features. You’ll see that the OpenSSH client is now installed.
- You can now close all windows and restart your computer. It’s important to restart your computer to complete the installation. Otherwise, Windows won’t recognize the SSH command when you try to use it in the command prompt.
How to Use the OpenSSH Client
For information about what each command-line argument means, you can visit the SSH manual page.
List of arguments:
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
To connect to a remote server, simply use the command line: ssh [user]@[host]
. For example, to connect to an Ubuntu server, type:
ssh spysoftnet@ub-test
If you’re connecting to a specific SSH server for the first time, you’ll need to confirm and save the key locally. If you type yes
, the host’s key will be saved in the file %UserProfile%\.ssh\known_hosts
, and you won’t need to do this again for that server.
Next, you’ll be prompted to enter the password for the user account on the remote server.
If you enter the correct password, you’ll be logged into the remote server.
When you’re done using the remote server and want to end the SSH session, just type exit
and press Enter. The SSH client will display “Connection to [server] closed.” After that, you can close the command prompt.