OpenSSH on Windows 10

PuTTY on the shelf


I prefer using the same toolset across platforms, and as Windows 10 have included OpenSSH for a while, why not put PuTTY on the shelf?

Decommissioning PuTTY will also provide you with the ability to do so much more from the command line, and reuse your scripts from your favorite distro.

It's 3 simple steps (4 if you convert your PuTTY key).

1. Install the OpenSSH Client features

Add-WindowsCapability -Online -Name OpenSSH.Client*

Or from the GUI

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

2. Configure the SSH agent service to start automatically

Get-Service -Name ssh-agent | Set-Service -StartupType Automatic

As the service hasn't really been given the chance to auto-start, go ahead and start it

Start-Service ssh-agent

3. Add the required key(s)

ssh-add C:\Users\<i>username</i>\.ssh\keyname

Example: ssh-add C:\Users\Martin\.ssh\id_ed25519

Optional (if you only have a PuTTY private key)

Use Puttygen to show the actual key and export (force new file format) that

That's all there is to it.

No comments: