ssh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombinedOutput

func CombinedOutput(ctx context.Context, node string, cmd string, args ...string) ([]byte, error)

CombinedOutput executes the cmd on the remote node and returns its combined standard output and standard error.

func Download

func Download(ctx context.Context, localPath string, node string, remotePath string) error

Download downloads files from remote node path to local path.

func Exec

func Exec(ctx context.Context, node string, cmd string, args ...string) error

Exec executes the cmd on the remote node. Here we assume we can run with `ssh node cmd` directly TODO: add a SSH config?

func Upload

func Upload(ctx context.Context, localPath string, node string, remotePath string) error

Upload uploads files from local path to remote node path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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