ssh

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuthorizedKey

func AddAuthorizedKey(ctx context.Context, cfg AuthorizedKeyConfig) error

AddAuthorizedKey copies public key to remove machine the same as ssh-copy-id command.

Types

type AuthorizedKeyConfig

type AuthorizedKeyConfig struct {
	PrivateKey    []byte
	User          string
	Addr          string
	AuthorizedKey []byte
}

type ConnectConfig

type ConnectConfig struct {
	PrivateKey []byte
	User       string
	Addr       string
}

type Keys

type Keys struct {
	Public  []byte
	Private []byte
}

func GenerateKeys

func GenerateKeys(name string) (*Keys, error)

type Terminal

type Terminal interface {
	Connect(ctx context.Context, cfg ConnectConfig) error
}

func NewTerminal

func NewTerminal(log logrus.FieldLogger) Terminal

Jump to

Keyboard shortcuts

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