Starting the SSH-Agent and adding a key pair to Powershell.
3 min read · May 14, 2022
--
Purpose
To create a quick how-to on installing OpenSSH client and how to start the SSH-Agent on Powershell in order to add a key pair to log in to a VM.
For the TLDR click here.
Prerequisites
First, verify you have Open SSH, and run this command, if you get an “Installed” for both the client and server then skip to Starting SSH-Services section.
Get-WindowsCapability -Online | Where-Object Name -like ‘OpenSSH*’
I started by completely removing OpenSSH from my system so I would be starting bare bones.
To install OpenSSH Client, a restart and update are required of the PC.
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Install the OpenSSH Server.
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Here you may get an error in red letters. Run the following if you do
Add-WindowsCapability -Online -Name "Msix.PackagingTool.Driver~~~~0.0.1.0
Restart and Update PC, if you had to restart again rerun the install OpenSSH server command above. Then verify our services are installed, if both are installed follow the next steps.
Get-WindowsCapability -Online | Where-Object Name -like ‘OpenSSH*’