ssh

package
v0.0.0-...-f852ded Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 15 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 interface {
	// Run runs a command over the SSH connection.
	Run(bool, string) error

	// CombinedOutput runs a command over the SSH connection, returning the combined
	// stdin and stdout.
	CombinedOutput(string) ([]byte, error)

	// Close closes the SSH connection.
	Close() error

	// Shell creates a login shell.
	Shell() error
}

Client is an SSH client used for `kelda` commands.

func New

func New(host string, keyPath string) (Client, error)

New returns an SSH Client connected to the given host.

type Getter

type Getter func(string, string) (Client, error)

Getter is used to retrieve a Client.

type NativeClient

type NativeClient struct {
	*ssh.Client
}

NativeClient is wrapper over Go's SSH client.

func (NativeClient) CombinedOutput

func (c NativeClient) CombinedOutput(command string) ([]byte, error)

CombinedOutput runs an SSH command, returning the combined stdin and stdout.

func (NativeClient) Run

func (c NativeClient) Run(requestPTY bool, command string) error

Run runs an SSH command.

func (NativeClient) Shell

func (c NativeClient) Shell() error

Shell starts a login shell.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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