ssh

package
v2.18.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: MIT Imports: 2 Imported by: 1

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

type PubKeyInfo struct {
	ID     string
	Public string
}

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.

Jump to

Keyboard shortcuts

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