ssh

package
v0.0.0-...-f4b035f Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvironment

func GetEnvironment(key string) string

use os package to get the env variable which is already set

func InitializeSshAgent

func InitializeSshAgent(sshUser *string) *ssh.ClientConfig

If the ssh-agent is running with the private key, this allows you to re-use private key for the SSH. Syntax is config := InitializeSshAgent(&user)

func Parallel

func Parallel(f fn, cmd string, hosts []string, config *ssh.ClientConfig)

func ReadLines

func ReadLines(path string) ([]string, error)

func RunCommand

func RunCommand(cmd, host string, config *ssh.ClientConfig) (string, string)

func RunScriptCommand

func RunScriptCommand(scriptPath, host string, config *ssh.ClientConfig) (string, string)

Types

type Connection

type Connection struct {
	Hosts    []string
	Host     string
	Username string
}

Jump to

Keyboard shortcuts

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