Documentation
¶
Overview ¶
Package keys generates and encodes SSH key pairs (ed25519 or RSA) using only the standard library plus golang.org/x/crypto/ssh for SSH wire encoding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSigner ¶
LoadSigner reads a private key PEM file and returns an ssh.Signer for auth. If the key is passphrase-protected it prompts for the passphrase (no echo).
func ReadPublic ¶
ReadPublic returns the stored authorized_keys line for display/installation.
Types ¶
type Pair ¶
type Pair struct {
PrivatePEM []byte
PublicAuth []byte // single authorized_keys line, newline-terminated
Fingerprint string
}
Pair holds the encoded private (OpenSSH PEM) and public (authorized_keys line) representations of a freshly generated key, plus its fingerprint.
Click to show internal directories.
Click to hide internal directories.