Install OpenSSH on Windows 10 using PowerShell

Install OpenSSH on Windows 10 using PowerShell

If you haven’t heard, the latest versions of Windows 10 now has an OpenSSH client and server. There are several articles that detail how to install OpenSSH from the graphical settings panel in Windows 10 but I had a hard time finding the command to install OpenSSH via powershell.

Install OpenSSH on Windows 10 (via PowerShell)

# Install ssh client from PowerShell
PS C:\> Add-WindowsCapability -Online -Name OpenSSH.Client*
# Install sshd server from PowerShell
PS C:\>Add-WindowsCapability -Online -Name OpenSSH.Server*

Install SSH on Windows 10 (via Graphical Interface)

  1. Click Start choose Settings
  2. Choose Apps from Windows Settings
  3. Click “Manage optional features
  4. Click “Add a feature
  5. Choose “OpenSSH Client” and click the Install button

Once installed, you should automatically have access to the followings ssh commands from any command prompt or powershell prompt.

  • ssh.exe
  • scp.exe
  • sftp.exe
  • ssh-add.exe
  • ssh-agent.exe
  • ssh-keygen.exe
  • ssh-keyscan.exe

The above OpenSSH binaries are located in c:\windows\system32\OpenSSH\

SSH related files such as known_hosts and any user generated keypairs are located in %USERPROFILE%\.ssh\ ie. c:\users\myuser\.ssh\

Original Photo by Pascal Terjan – Remixed and released under a CC BY-SA license.

8 Replies to “Install OpenSSH on Windows 10 using PowerShell”

  1. I have Windows 10 Home build 19041, but I don’t have “OpenSSH Client” under Add a feature, only “OpenSSH Server”. Thanks.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.