putty-go

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: Apache-2.0

README

putty-go

Consume puTTY keys (PPK files) in go

Overview

This library supports version 2 and version 3 PPK files, with the following limitations:

  • ssh-ed448 keys cannot be converted to Go public/private keys.
  • Argon2d KDF is not supported.

Examples

Load the public and private keys from a password-protected PPK file
keyPair, err := LoadKeypair("mykey.ppk", []byte("hunter2"))

For unencrypted PPK files, use ppk.NoPassphrase as the passphrase.

Load the public key from a password-protected PPK file without the password (skips MAC verification)
ppk, err := InsecureParseFile("mykey.ppk")
pub, err := putty.UnmarshalPublicKey(ppk.PublicBytes, ppk.Comment)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL