openssh

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package openssh parses OpenSSH private key format (unencrypted). It extracts key type, comment, and public/private key blobs.

Index

Constants

This section is empty.

Variables

View Source
var ErrEncryptedPrivateKey = errors.New("encrypted private key (passphrase-protected); sshush only supports unencrypted keys")

ErrEncryptedPrivateKey is returned when the file is a passphrase-protected private key.

View Source
var ErrNotOpenSSHKey = errors.New("openssh: not an unencrypted OpenSSH private key")

ErrNotOpenSSHKey is returned by ParsePrivateKeyBlob when the data is not an unencrypted OpenSSH private key. Encrypted OpenSSH keys return ErrEncryptedPrivateKey instead.

Functions

This section is empty.

Types

type ParsedKey

type ParsedKey struct {
	KeyType    string
	Comment    string
	PublicKey  []byte // SSH wire format public key (e.g. for ssh.ParsePublicKey)
	PrivateKey []byte // PEM-encoded private key
}

ParsedKey holds parsed OpenSSH key metadata.

func ParsePrivateKeyBlob

func ParsePrivateKeyBlob(data []byte) (*ParsedKey, error)

ParsePrivateKeyBlob parses unencrypted OpenSSH private key data.

Jump to

Keyboard shortcuts

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