ssh

package
v0.0.0-...-93f324c Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: MIT Imports: 8 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(cmd Command) error

type Command

type Command struct {
	Environment []string
	Command     []string
	Stdin       string
	Abort       chan interface{}
}

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