Microsoft integrated OpenSSH client to Windows 10 is available for Windows 10 build 1809 and later (while OpenSSH Server is available on Windows Server 2019 and later). OpenSSH is an open-source implementation of the SSH protocol for remote login.

If you used third-party client tools like SecureCRT and Putty, now you can use Windows inbuilt SSH client.

OpenSSH client includes ssh, scp, sftp, ssh-add, ssh-agent, ssh-keygen, and ssh-keyscan. Windows 10 also provide OpenSSH server but to connect ssh, OpenSSH client is only required.

In this tutorial we learn how to enable SSH client on Windows 10 to access SSH servers.

Install Windows 10 SSH Client

Although intergrated into Windows 10, the SSH components are optional and not installed by default on the OS.

To install the OpenSSH components:

  • Open Settings, select Apps > Apps & Features, then select Optional Features.
Apps & Features
Apps & Features
  • If OpenSSH Client already installed it will list there, if not click Add a feature. Then select OpenSSH Client and click Install button.
Install OpenSSH client in Windows 10
Install OpenSSH client

Once setup completes, return to Apps > Apps & Features and Optional Features and you should see OpenSSH Client listed.

Install OpenSSH Client via PowerShell

You can also easily install OpenSSH client and server from Powershell. For ssh access, you only need openssh client.

Make sure to open PowerShell in Administrator mode.

To check OpenSSH already installed, run:

PS: C:\Users\tiwo> Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

Output:

Name  : OpenSSH.Client~~~~0.0.1.0
 State : NotPresent
Name  : OpenSSH.Server~~~~0.0.1.0
 State : NotPresent

If not present, you can proceed to install the openssh.

To install openssh client, run:

PS C:\Users\tiwo> Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

To install openssh server, run:

PS C:\Users\tiwo> Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Sample Output:

Path          : 
Online        : True 
RestartNeeded : False

Initiating a SSH Connect from PowerShell/CMD

Once installation is complete, you can connect to any remote machine using ssh from Windows using PowerShell or command line. Ensure PowerShell is in administrator mode.

PS C:\Users\tiwo> ssh username@example.com

or

PS C:\Users\tiwo> ssh username@example.com -p 7568

Selecting yes adds that server to the list of known ssh hosts on your Windows client.

You are prompted for the password at this point. Once connected, you will see the shell prompt. SSH related files are kept in %USERPROFILE%\.ssh and OpenSSH binaries are in C:\Windows\System32\OpenSSH folder.

ie. in my case C:\Users\tiwo\.ssh\

Uninstall OpenSSH client

You can easily uninstall SSH components using the PowerShell.

Uninstall the OpenSSH Client:

C:\Users\tiwo> Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

To uninstall the OpenSSH Server:

C:\Users\tiwo> Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

To uninstall SSH from GUI, proceed as follows:

  1. Open Settings, then go to Apps > Apps & Features.
  2. Go to Optional Features.
  3. In the list, select OpenSSH Client or OpenSSH Server.
  4. Select Uninstall.

Conclusion

In this tutorial, we learned how to install OpenSSH client in a Windows 10 or Windows server environment. We also learned how to connect ssh from PowerShell and uninstall OpenSSH components.