Installing OpenSSH on a Windows Computer

Prerequisites

Before we begin, you need to make sure that you have PowerShell 5.1 or later installed on your computer. You also need to have an account that is a member of the built-in Administrators group. To validate your environment, open an elevated PowerShell session and do the following:

  1. Type winver.exe and press enter to see the version details for your Windows device.
  2. Run $PSVersionTable.PSVersion.
  3. Run the command below. The output will show True when you’re a member of the built-in Administrators group.
(New-Object Security.Principal.WindowsPrincipal ([Security.Principal.WindowsIdentity]::GetCurrent ())).IsInRole ([Security.Principal.WindowsBuiltInRole]::Administrator)

Steps to Install OpenSSH

  1. Open Windows PowerShell by typing “PowerShell” in the search bar and selecting “Windows PowerShell” from the results.
  2. Type the following command to install the OpenSSH components:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
  1. Once setup completes, return to Apps and Optional Features and confirm OpenSSH is listed.
  2. Open the Services desktop app. (Select Start, type services.msc in the search box, and then select the Service app or press ENTER .)
  3. In the details pane, double-click OpenSSH SSH Server.
  4. On the General tab, from the Startup type drop-down menu, select Automatic.
  5. To start the service, select Start.

That’s it! You have successfully installed OpenSSH on your Windows computer. Now you can use Windows PowerShell and OpenSSH to generate a private/public key pair.

Leave a Comment

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