ssh

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(connector *Connector, opts Opts) (executor.Interface, error)

NewConnection attempts to create a new SSH connection to the host specified via the given options.

Types

type Connector

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

Connector holds a map of Connections

func NewConnector

func NewConnector(ctx context.Context) *Connector

NewConnector constructor

func (*Connector) Open added in v1.5.0

Open to the node

func (*Connector) Tunnel added in v1.0.0

Tunnel returns established SSH tunnel

type Opts

type Opts struct {
	Context              context.Context
	Username             string
	Password             string
	Hostname             string
	Port                 int
	PrivateKey           string
	KeyFile              string
	HostPublicKey        []byte
	AgentSocket          string
	Timeout              time.Duration
	Bastion              string
	BastionPort          int
	BastionUser          string
	BastionHostPublicKey []byte
}

Opts represents all the possible options for connecting to a remote server via SSH.

Jump to

Keyboard shortcuts

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