Help us shape the future of Go! Take the 2026 Go Developer Survey

sshtunnel

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SshTunnel

type SshTunnel struct {
	Host string
	Port int
	User string
	// PrivateKeys are the keys offered to the server, most preferred first. SSH
	// public-key auth tries them in order and the server accepts the first one
	// it trusts, so a caller rotating its key can offer the new key alongside
	// the one it replaces and no handshake breaks while the server's
	// authorized_keys is being updated.
	//
	// Offer only the keys that are still meant to work: OpenSSH counts every
	// attempt against MaxAuthTries (6 by default) and drops the connection once
	// it is exhausted, so a long list of retired keys can fail a handshake the
	// first entry would have completed.
	PrivateKeys [][]byte
	Timeout     time.Duration
}

func (*SshTunnel) IsEnabled

func (r *SshTunnel) IsEnabled() bool

type SshTunnelDialer

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

func NewSshTunnelDialer

func NewSshTunnelDialer(tunnel *SshTunnel) (*SshTunnelDialer, error)

func (*SshTunnelDialer) Close

func (d *SshTunnelDialer) Close() error

func (*SshTunnelDialer) Dial

func (d *SshTunnelDialer) Dial(network, address string) (net.Conn, error)

func (*SshTunnelDialer) DialContext

func (d *SshTunnelDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*SshTunnelDialer) DialTimeout

func (d *SshTunnelDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)

Jump to

Keyboard shortcuts

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