ssh

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Username    string        `json:"username"`
	Password    string        `json:"password"`
	Address     string        `json:"address"`
	Port        int           `json:"port"`
	PrivateKey  string        `json:"-"`
	KeyFile     string        `json:"-"`
	AgentSocket string        `json:"-"`
	Timeout     time.Duration `json:"timeout"`
	Bastion     string        `json:"-"`
	BastionPort int           `json:"-"`
	BastionUser string        `json:"-"`
}

type Connection

type Connection interface {
	SftpCli() *sftp.Client
	Exec(cmd string) (stdout string, err error)
	Close()
}

func NewConnection

func NewConnection(cfg Cfg) (Connection, error)

Jump to

Keyboard shortcuts

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