How to install and use the Windows 10 SSH feature

Linux offers SSH directly via the Bash interface, and now you can do the same for Windows 10! Why do this? Putty makes it hard to initiate new server connections via the CLI and thus limits automation capability. Having SSH installed on Windows makes this task super straightforward. This post will show you how to install and use the Windows 10 SSH feature.

How to install the Windows 10 SSH feature

You can install the SSH feature using the Optional Features in Windows Settings or Windows PowerShell. However, either of these options will require elevated Administrator permissions.

To install SSH: click on Start -> Settings Apps -> Apps and Features -> Manage Optional Features. Next, find "OpenSSH Client" and then click "Install".

Alternatively, you can run the following command via PowerShell to install SSH:

Add-WindowsCapability -Online -Name OpenSSH.Client*

See the following example screenshot:

PowerShell Add Windows Capability OpenSSH
PowerShell Add Windows Capability OpenSSH

How to use the Windows 10 SSH feature

Run the ssh command to see all the parameters that you can run.

PowerShell Run SSH
PowerShell Run SSH

Additionally, you should now be able to run a basic SSH command such as:

ssh username@servername

The first connection to a server will result in a message like the following:

The authenticity of host 'server name (<the server ip>)' can't be established.
ECDSA key fingerprint is SHA256:(<a large string>).
Are you sure you want to continue connecting (yes/no)?

Answer "yes" so that SSH will add the server to the local system's list of known SSH hosts.

Of course, most of you may be using private key files instead of passwords. The easiest way to do this is by storing your private key file in the .ssh folder of your user profile.

You can then connect to your server using the following example command:

PS C:\Users\user> ssh -i ./.ssh/myPrivateKey.pem ubuntu@ -p 22

Remember to run PowerShell as your local Windows user for the example mentioned above.

Consequently, you will also have access to the following SSH commands from your Windows command prompt or PowerShell: ssh.exe, scp.exe, sftp.exe, ssh-add.exe, ssh-agent.exe, ssh-keygen.exe, and ssh-keyscan.exe.

Wrapping up

Now you know how to install and use the Windows 10 SSH feature! Tell Anto Online if you prefer using Putty or how it stacks up with Linux's SSH client. You may also be interested to see "How to setup Windows Subsystem for Linux".


You may also want to visit the following excellent sources for more in-depth information:

You may also be interested in

About the Authors

Anto's editorial team loves the cloud as much as you! Each member of Anto's editorial team is a Cloud expert in their own right. Anto Online takes great pride in helping fellow Cloud enthusiasts. Let us know if you have an excellent idea for the next topic! Contact Anto Online if you want to contribute.

Support the Cause

Support Anto Online and buy us a coffee. Anything is possible with coffee and code.

Buy me a coffee

Leave a Reply

Your email address will not be published. Required fields are marked *