Documentation
¶
Overview ¶
Package ssh contains SSH related utility functions that are used by both the CLI binary and the client SDK
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrInvalidPubKey ¶
type ErrInvalidPubKey struct {
// contains filtered or unexported fields
}
ErrInvalidPubKey is the error returned when an SSH public key is unrecognizable
func (ErrInvalidPubKey) Error ¶
func (e ErrInvalidPubKey) Error() string
Error is the error interface implementation
type ErrUnknownPubKeyID ¶
type ErrUnknownPubKeyID struct {
// contains filtered or unexported fields
}
ErrUnknownPubKeyID is the error returned when an SSH public key is not the expected format
func (ErrUnknownPubKeyID) Error ¶
func (e ErrUnknownPubKeyID) Error() string
type PubKeyInfo ¶
PubKeyInfo contains the information on an SSH public key
func ParsePubKey ¶
func ParsePubKey(backupKeyID string, pubKey []byte) (*PubKeyInfo, error)
ParsePubKey parses a byte slice representation of an SSH Public Key into an SSHPubKeyInfo struct. If it cannot find the key ID from the pubKey byte slice itself, it uses backupKeyID instead. Returns an appropriate error if parsing failed.
Click to show internal directories.
Click to hide internal directories.