ssh

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPEMData    = errors.New("no PEM data in key file")
	ErrEncryptedKey = errors.New("private key is encrypted")
)

Functions

func Shell

func Shell(opts *stage.SSHOptions) error

Types

type Executor

type Executor struct {
	Stderr io.Writer
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(opts *stage.SSHOptions) (*Executor, error)

func (*Executor) Close

func (executor *Executor) Close() error

func (*Executor) Execute

func (executor *Executor) Execute(cmd string) (string, error)

func (*Executor) WriteFile

func (executor *Executor) WriteFile(opts *FileOptions) error

type FileOptions

type FileOptions struct {
	Path    string
	Content []byte
	Reader  io.Reader
	Size    int64
	Mode    os.FileMode
}

type KeyPair

type KeyPair struct {
	PrivateKey []byte
	PublicKey  []byte
}

func NewKeyPair

func NewKeyPair(path string) (KeyPair, error)

Jump to

Keyboard shortcuts

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