sshexec

package module
v0.0.0-...-b01f487 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownHostKey = errors.New("unknown host key")

Functions

func NewClient

func NewClient(creds *Credentials, port string, opts ...func(*ssh.ClientConfig)) (*ssh.Client, error)

func NewClientConfig

func NewClientConfig(creds *Credentials, opts ...func(*ssh.ClientConfig)) (*ssh.ClientConfig, error)

func NewSessionHandler

func NewSessionHandler(opts SessionOptions, args []string) (SessionHandler, *Destination, error)

Types

type Credentials

type Credentials struct {
	User          string
	Hostname      string
	KnownHostKeys []ssh.PublicKey
	Cert          *ssh.Certificate
	Signer        ssh.Signer
}

type Destination

type Destination struct {
	User     string
	Instance string
	Port     string
}

type SessionHandler

type SessionHandler interface {
	HandleSession(*ssh.Client) error
}

type SessionOptions

type SessionOptions struct {
	User                string
	Port                string
	WithSubsystem       bool
	ArgsCommands        bool
	ForcePseudoTerminal bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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