ssh

package
v1.5.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(connector *Connector, o 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
	AgentSocket string
	Timeout     time.Duration
	Bastion     string
	BastionPort int
	BastionUser string
}

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