ssh

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const USAGE = `option: [flags] [user@]hostname [command]
Flags (Most are same as OpenSSH 'ssh' command)
* -p int : SSH server port (Default 22)
* -R string, -L string, -D string : Set up port forwarding
* -T : Disable pseudo-terminal allocation
* -i string : The identity (private key) (default to ~/.ssh/id_*)
* -o string : SSH option
* --ts-insecure : Accept unknown ssh server
E.g.: /addexecutor myssh ssh example.com
By default it only allows public-key authentication and uses OpenSSH ~/.ssh/id_* identity files.` + "\n" +
	"To use password authentication, type '/setsecret <name> <secret>' to set the password. " +
	"The public key of the ssh server will be checked against ~/.ssh/known_hosts file."

Variables

This section is empty.

Functions

func NewExecutor

func NewExecutor(executorConfig *config.ConfigExecutorStruct, extraOption string) (executor.Executor, error)

Types

type Ssh

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

func (*Ssh) Buttons

func (s *Ssh) Buttons() (buttons []string)

Buttons implements executor.Executor.

func (*Ssh) Cancel

func (s *Ssh) Cancel()

func (*Ssh) Chan

func (s *Ssh) Chan() <-chan string

func (*Ssh) Clear

func (s *Ssh) Clear()

Clear implements executor.Executor.

func (*Ssh) Close

func (s *Ssh) Close()

func (*Ssh) Exec

func (s *Ssh) Exec(ctx context.Context, cmdline string, isRaw bool) (output chan string)

func (*Ssh) History

func (s *Ssh) History() []string

History implements executor.Executor.

func (*Ssh) Name

func (s *Ssh) Name() string

func (*Ssh) Open

func (s *Ssh) Open() error

Open implements executor.Executor.

func (*Ssh) Write

func (s *Ssh) Write(p []byte) (n int, err error)

ssh stdout+stderr io.Writer

Jump to

Keyboard shortcuts

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