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 ¶
ParsePrivateKeyBlob parses unencrypted OpenSSH private key data.
Click to show internal directories.
Click to hide internal directories.