sshutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewSSHKeys

func GenerateNewSSHKeys() ([]byte, []byte, error)

Generate public and private rsa keys

func IsResponding

func IsResponding(ip string) bool

Check if host is responding

Types

type SSHClient

type SSHClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, user string, privKeyFile string) (*SSHClient, error)

func (*SSHClient) RunAsSudo

func (c *SSHClient) RunAsSudo(command string) error

func (*SSHClient) RunAsUser

func (c *SSHClient) RunAsUser(command string) error

Jump to

Keyboard shortcuts

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