util

package
v0.0.0-...-e5b634d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPublicKeyToRemoteNode

func AddPublicKeyToRemoteNode(host string, port int32, username string, password string, publicKey string) error

AddPublicKeyToRemoteNode will add the publicKey to the username@host:port's authorized_keys file w/password

func ExecuteCommandOnRemoteNode

func ExecuteCommandOnRemoteNode(host string, port int32, username string, authMethod ssh.AuthMethod, command string) error

ExecuteCommandOnRemoteNode executes the commmand on username@host:port using the authMethed

func GenerateSSHKeyPair

func GenerateSSHKeyPair() (private string, public string, err error)

GenerateSSHKeyPair creates a ECDSA a x509 ASN.1-DER format-PEM encoded private key string and a SHA256 encoded public key string

func GetModuleLogger

func GetModuleLogger(module string, level loggo.Level) loggo.Logger

GetModuleLogger get a logger given a module name and level

func SSHAuthMethPublicKey

func SSHAuthMethPublicKey(privateKey string) (ssh.AuthMethod, error)

SSHAuthMethPublicKey generates a ssh public key authentication method based on privateKey

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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