ssh

package
v9.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config

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

func (*Client) Cleanup

func (s *Client) Cleanup()

func (*Client) Connect

func (s *Client) Connect() error

func (*Client) Exec

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

func (*Client) Run

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

type ExitError struct {
	Inner error
}

func (*ExitError) Error

func (e *ExitError) Error() string

Jump to

Keyboard shortcuts

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