Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

openSSH is a popular tool for performing operations using SSH, SCP and SFTP.  As of version 1809 of Windows 10 it actually comes bundled.  Since On the current version of the desktops at TC use (version 1709), openSSH requires an installation as it is an optional feature.

Tip

DO NOT install the optional feature version of openSSH on your older version of Windows 10 as this version is not fully featured.  Install the latest from GitHub as per below.


Install Steps

Note that there are some pre-install steps that must be taken to avoid an error during the installation.

...

Follow steps 1-5 from this link.  If you only want the openSSH client then this is good enough.  If you want to set up the openSSH server, generate keys, etc. then go ahead and look at the remaining steps.

You should now be able to type ssh, sftp, scp or any other openSSH commands into your command window.

Some Useful Info

Private Key Format

If you're using a private key with extension .ppk (Putty private key), this will have to be converted to openSSH format so that you can use it with openSSH.  To do this you'll have to download PuTTY and use PuTTYGen to export your key as an openSSH key as described here.

Sample Usage

If you want to send a file securely using SFTP:

  1. Set up a configuration file.
    1. eg.
  2. Open regedit.
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU.
  4. Change the value of the UseWUServer attribute to 0.
  5. In a command window run the following:
Code Block
languagebash
net stop wuauserv && net start wuauserv

Install

  1. To make sure that the OpenSSH features are available for install, run the following in powershell:

    Code Block
    languagepowershell
    Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

    This should return the following:

    Code Block
    languagepowershell
    Name  : OpenSSH.Client~~~~0.0.1.0
    State : NotPresent
    
    Name  : OpenSSH.Server~~~~0.0.1.0
    State : NotPresent


  2. Then, simply install the client and/or server features as follows:

    Code Block
    languagepowershell
    # Install the OpenSSH Client
    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
    
    # Install the OpenSSH Server
    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

    Both should return the following output:

    Code Block
    languagepowershell
    Path          :
    Online        : True
    RestartNeeded : False


  3. You should now be able to type ssh, sftp, scp or any other openSSH commands into your command window.