Documentation ¶
Index ¶
- func AddPublicKeyToRemoteNode(host string, port int32, username string, password string, publicKey string) error
- func ExecuteCommandOnRemoteNode(host string, port int32, username string, authMethod ssh.AuthMethod, ...) error
- func GenerateSSHKeyPair() (private string, public string, err error)
- func GetModuleLogger(module string, level loggo.Level) loggo.Logger
- func SSHAuthMethPublicKey(privateKey string) (ssh.AuthMethod, error)
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 ¶
GenerateSSHKeyPair creates a ECDSA a x509 ASN.1-DER format-PEM encoded private key string and a SHA256 encoded public key string
func GetModuleLogger ¶
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.
Click to show internal directories.
Click to hide internal directories.