ssh

package
v11.11.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2019 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.2.0

type Client struct {
	Config

	Stdout         io.Writer
	Stderr         io.Writer
	ConnectRetries int
	// contains filtered or unexported fields
}

func (*Client) Cleanup added in v1.2.0

func (s *Client) Cleanup()

func (*Client) Connect added in v1.2.0

func (s *Client) Connect() error

func (*Client) Exec added in v1.2.0

func (s *Client) Exec(cmd string) error

func (*Client) Run added in v1.2.0

func (s *Client) Run(ctx context.Context, cmd Command) error

type Command

type Command struct {
	Environment []string
	Command     []string
	Stdin       string
}

type Config

type Config struct {
	User         string `toml:"user,omitempty" json:"user" long:"user" env:"SSH_USER" description:"User name"`
	Password     string `toml:"password,omitempty" json:"password" long:"password" env:"SSH_PASSWORD" description:"User password"`
	Host         string `toml:"host,omitempty" json:"host" long:"host" env:"SSH_HOST" description:"Remote host"`
	Port         string `toml:"port,omitempty" json:"port" long:"port" env:"SSH_PORT" description:"Remote host port"`
	IdentityFile string `` /* 135-byte string literal not displayed */
}

type ExitError added in v1.4.0

type ExitError struct {
	Inner error
}

func (*ExitError) Error added in v1.4.0

func (e *ExitError) Error() string

Jump to

Keyboard shortcuts

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