Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.44 KB

README.MD

File metadata and controls

29 lines (18 loc) · 1.44 KB

Powershell Module: Putty key parser/converter

Putty key converter as c# class can read putty v2/v3 keys and convert it to keys suitable to use with .NET SSH modules such as Renci.SshNet

Powershell module was written as companion to Posh-SSH module

As well as Posh-SSH this module is for Windows PowerShell 5.1 or PowerShell 7.x., On Windows Server, version 1709 or older .Net Framework 4.8 or above is required for the proper loading of the module.

Usage example

$cred = Get-Credential
$KeyString = Get-Content D:\Putty.ppk | ConvertFrom-PPK -AsPrivate -Password $cred.Password
New-SSHSession -ComputerName myserver -Credentials $cred -KeyString $KeyString

Breaking change in v1.1.0.0 (may be)

By default cmdlet now return passphrase protected key. It may be breaking change if the credentials used to convert the key do not match those used to connect.

Notes

  • Konscious.Security.Cryptography.Argon2 used for ppk v3 decryption used as source in library, it modified to disable hardware acceleration to work without System.Numerics.Vectors which not available to netstandard2.0
  • BCrypt.cs used in openssh key encryption, (c) 2006 Damien Miller [email protected], (c) 2010 Ryan D. Emerle

TODO

  • Back Conversion
  • Non-ASCII Passwords under linux