ssh

package
v0.3.45 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(local io.Reader, remote io.WriteCloser)

Types

type Client

type Client interface {
	Attach() error
	ExecWithOutput(cmd string) ([]byte, error)
	LocalForward(localAddress, targetAddress string) error
	RemoteForward(localAddress, targetAddress string) error
	Close() error
}

func NewClient

func NewClient(opt Options) (Client, error)

type Copier

type Copier struct {
	Local  io.Reader
	Remote io.WriteCloser
}

Copier copies from local to remote terminalhandles the lifecycle of all the forwards

func (*Copier) Copy

func (c *Copier) Copy()

type Options added in v0.2.0

type Options struct {
	AgentForwarding bool
	Server          string
	User            string
	Port            int
	Auth            bool
	PrivateKeyPath  string
	PrivateKeyPwd   string
}

func DefaultOptions added in v0.2.0

func DefaultOptions() Options

func GetOptions added in v0.2.0

func GetOptions(entry string) (*Options, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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