ssh

package
v0.6.8-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthFailed = errors.New("ssh authentication failed")

Functions

This section is empty.

Types

type SSHCommand

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

func (*SSHCommand) Interactive

func (c *SSHCommand) Interactive() (io.WriteCloser, io.Reader, io.Reader, remote.Closer, error)

func (*SSHCommand) Output

func (c *SSHCommand) Output(ctx context.Context) ([]byte, error)

func (SSHCommand) Run

func (c SSHCommand) Run(ctx context.Context) error

type SSHConnection

type SSHConnection struct {
	Listeners []net.Listener
	// contains filtered or unexported fields
}

func FromHost

func FromHost(user, password, address string) (*SSHConnection, error)

func (*SSHConnection) Forward

func (a *SSHConnection) Forward(ctx context.Context, localPort int, remotePort int) error

func (*SSHConnection) ForwardKillAll

func (a *SSHConnection) ForwardKillAll(ctx context.Context) error

func (*SSHConnection) GetCmd

func (a *SSHConnection) GetCmd(cmd string, args ...string) remote.Cmder

func (*SSHConnection) List

func (a *SSHConnection) List(path string) ([]remote.FileInfo, error)

func (*SSHConnection) MkDirAll

func (a *SSHConnection) MkDirAll(path string) error

func (*SSHConnection) ReadFile

func (a *SSHConnection) ReadFile(path string) (io.ReadCloser, error)

func (*SSHConnection) Remove

func (a *SSHConnection) Remove(path string) error

func (*SSHConnection) Stats

func (a *SSHConnection) Stats(p string) (remote.FileInfo, error)

func (*SSHConnection) WriteFile

func (a *SSHConnection) WriteFile(r io.Reader, path string) error

Jump to

Keyboard shortcuts

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