ssh

package
v0.0.0-...-47eee47 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(hostname string, port int, cfg ssh.ClientConfig) (*ssh.Client, error)

NewClient creates an ssh client.

func NewConfig

func NewConfig(user, keyfname string) (*ssh.ClientConfig, error)

NewConfig creates an ssh client config that ignores insecure host keys. keyfname is the path to a private ssh key file to use.

Types

type Launcher

type Launcher struct {
	*ssh.Client
}

Launcher implements piper.Launcher

func NewLauncher

func NewLauncher(user, host, keyfname string) (*Launcher, error)

NewLauncher creates a new Launcher by starting an ssh client. It will ignores insecure host keys. keyfname is the path to a private ssh key file to use.

func (Launcher) Close

func (l Launcher) Close() error

Close implements the piper.Launcher interface.

func (Launcher) Errorf

func (l Launcher) Errorf(pat string, args ...interface{}) error

Errorf implements the piper.Launcher interface.

func (Launcher) Launch

func (l Launcher) Launch(command string) (piper.Executor, error)

Launch implements the piper.Launcher interface by creating a new ssh session.

func (Launcher) String

func (l Launcher) String() string

String implements the piper.Launcher interface.

Jump to

Keyboard shortcuts

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