ssh

package
v9.2.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: MIT Imports: 9 Imported by: 174

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