ssh

package
v0.73.9 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(
	serverHost string,
	sshUsername string,
	sshPrivateKeyfile string,
	srcFilepath string,
	dstFilepath string,
	logger *zap.Logger,
) error

func GetSSHConnection

func GetSSHConnection(
	serverHost string,
	sshUsername string,
	sshPrivateKeyfile string,
) (*ssh.Client, error)

func RunCommandOnEveryHost

func RunCommandOnEveryHost(
	hosts []string,
	sshUsername string,
	sshPrivateKeyfile string,
	command string,
) map[string]RunResults

func RunCommandWithClient

func RunCommandWithClient(
	client *ssh.Client,
	command string,
) (string, error)

Types

type RunResults

type RunResults struct {
	Host   string
	Output string
	Err    error
}

Jump to

Keyboard shortcuts

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