ssh

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *ssh.Client
	// contains filtered or unexported fields
}

func Dial

func Dial(addr, identity string, opts ...Option) (*Client, error)

func (Client) Forward added in v0.10.0

func (c Client) Forward(local, remote int) error

func (Client) Output

func (c Client) Output(cmd string) ([]byte, error)

func (Client) Push

func (c Client) Push(name string, mode os.FileMode, size int64, r io.Reader, chstatus chan PushStatus) error

func (Client) Run

func (c Client) Run(cmd string, echo bool) error

func (Client) RunPTY

func (c Client) RunPTY(cmd string, echo bool) error

type Option added in v0.14.1

type Option interface {
	Apply(*Client)
}

func WithRetries added in v0.14.1

func WithRetries(n int) Option

func WithTimeout added in v0.14.1

func WithTimeout(d time.Duration) Option

type OptionFunc added in v0.14.1

type OptionFunc func(*Client)

func (OptionFunc) Apply added in v0.14.1

func (f OptionFunc) Apply(c *Client)

type PushStatus added in v0.13.0

type PushStatus struct {
	N, Size int64
}

Jump to

Keyboard shortcuts

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