ssh

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFrom added in v0.3.0

func CopyFrom(args SSHArgs, rootDir string, sourcePath string) error

CopyFrom copies one or more files using SCP from remote host and returns the paths of files that were successfully copied.

func MakeTestSSHFile added in v0.3.0

func MakeTestSSHFile(t *testing.T, args SSHArgs, filePath, content string)

func RemoveTestSSHFile added in v0.3.0

func RemoveTestSSHFile(t *testing.T, args SSHArgs, fileName string)

func Run added in v0.3.0

func Run(args SSHArgs, cmd string) (string, error)

Run runs a command over SSH and returns the result as a string

func RunRead added in v0.3.0

func RunRead(args SSHArgs, cmd string) (io.Reader, error)

RunRead runs a command over SSH and returns an io.Reader for stdout/stderr

Types

type ProxyJumpArgs added in v0.3.0

type ProxyJumpArgs struct {
	User string
	Host string
}

type SSHArgs added in v0.3.0

type SSHArgs struct {
	User           string
	Host           string
	PrivateKeyPath string
	Port           string
	MaxRetries     int
	ProxyJump      *ProxyJumpArgs
}

Jump to

Keyboard shortcuts

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