sshclient

package
v0.0.0-...-11f2a26 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 4 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 {
	// contains filtered or unexported fields
}

Client to execute commands over SSH.

func NewClient

func NewClient(opts ClientOpts, logger *logrus.Logger) (*Client, error)

NewClient creates a new client to start a SSH session.

func (*Client) Run

func (c *Client) Run(command []string) error

Run adds the optional remote command and starts the SSH session.

type ClientOpts

type ClientOpts struct {
	BinaryPath string
	Input      io.Reader
	Out        io.Writer
	ErrOut     io.Writer
	SSHOptions []string
	Config     string
	User       string
	Proxy      string
	Host       string
}

ClientOpts defines all available options that can be set on a Client.

Jump to

Keyboard shortcuts

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