ssh

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrimSpaceNewlineInString

func TrimSpaceNewlineInString(s string, expr string) string

Types

type SSHClient

type SSHClient struct {
	Host           string
	Port           int
	User           string
	Password       string
	PrivateKeyFile string
	Timeout        int
	Config         *ssh.ClientConfig
	Env            []string
	Cmd            string
	Stdout         string
	Stderr         string

	Client  *ssh.Client
	Session *ssh.Session
}

func (*SSHClient) PublicKeyFile

func (client *SSHClient) PublicKeyFile(file string) ssh.Signer

func (*SSHClient) Run

func (client *SSHClient) Run(ctx context.Context, cmd string) error

Jump to

Keyboard shortcuts

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