sshexec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SSHClient

func SSHClient(host string, port int, user, private, passphrase string) (*ssh.Client, error)

Types

type Cmd

type Cmd struct {
	Name           string
	Args           []string
	Stdin          io.Reader
	Stdout, Stderr io.Writer
	// contains filtered or unexported fields
}

func Command

func Command(client *ssh.Client, name string, args ...string) *Cmd

func (*Cmd) CombinedOutput

func (c *Cmd) CombinedOutput() (string, error)

func (*Cmd) Exit

func (c *Cmd) Exit() error

func (*Cmd) Output

func (c *Cmd) Output() (string, error)

func (*Cmd) Run

func (c *Cmd) Run() error

func (*Cmd) SetLogger

func (c *Cmd) SetLogger(logger *slog.Logger)

func (*Cmd) SetPty

func (c *Cmd) SetPty(h, w int)

func (*Cmd) Start

func (c *Cmd) Start() error

func (*Cmd) StderrPipe

func (c *Cmd) StderrPipe() (io.Reader, error)

func (*Cmd) StdinPipe

func (c *Cmd) StdinPipe() (io.WriteCloser, error)

func (*Cmd) StdoutPipe

func (c *Cmd) StdoutPipe() (io.Reader, error)

func (*Cmd) String

func (c *Cmd) String() string

func (*Cmd) Wait

func (c *Cmd) Wait() error

type ExitError

type ExitError struct {
	Status int
}

func (ExitError) Error

func (e ExitError) Error() string

type PtyOptions

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

Jump to

Keyboard shortcuts

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