sshtunnel

package
v0.4.77 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrivateKeyAuthMethod

func GetPrivateKeyAuthMethod(keyBytes []byte, passphrase *string) (ssh.AuthMethod, error)

func GetTunnelAuthMethodFromSshConfig

func GetTunnelAuthMethodFromSshConfig(auth *mgmtv1alpha1.SSHAuthentication) (ssh.AuthMethod, error)

Auth Method is optional and will return nil if there is no valid method. Will only return error if unable to parse the private key into an auth method

func ParseSshKey

func ParseSshKey(keyString string) (ssh.PublicKey, error)

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, addr string) (net.Conn, error)
	Dial(network, addr string) (net.Conn, error)
}

type SSHDialer

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

func NewLazySSHDialer

func NewLazySSHDialer(addr string, cfg *ssh.ClientConfig) *SSHDialer

func NewSSHDialer

func NewSSHDialer(client *ssh.Client) *SSHDialer

func (*SSHDialer) Close

func (s *SSHDialer) Close() error

func (*SSHDialer) Dial

func (s *SSHDialer) Dial(network, addr string) (net.Conn, error)

func (*SSHDialer) DialContext

func (s *SSHDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error)

Directories

Path Synopsis
connectors

Jump to

Keyboard shortcuts

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