ssh

package
v0.0.0-...-d1d2f72 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyDialer

func NewProxyDialer(cfg *Config) (proxy.Dialer, error)

Types

type Client

type Client struct {
	*ssh.Client
}

func NewClient

func NewClient(cfg *Config) (*Client, error)

func (*Client) Dial

func (c *Client) Dial(ctx context.Context, protocol, address string) (net.Conn, error)

func (*Client) DialContext deprecated

func (c *Client) DialContext(ctx context.Context, protocol, address string) (net.Conn, error)

Deprecated: Use Dial instead.

type Config

type Config struct {
	Host         string `mapstructure:"host"`
	Port         int32  `mapstructure:"port"`
	Username     string `mapstructure:"username"`
	IdentityFile string `mapstructure:"identity_file"`
}

type DialerFunc

type DialerFunc func(ctx context.Context, network, addr string) (net.Conn, error)

func NewDialerFunc

func NewDialerFunc(cfg *Config) (DialerFunc, error)

func (DialerFunc) Dial

func (d DialerFunc) Dial(network, addr string) (c net.Conn, err error)

func (DialerFunc) DialContext

func (d DialerFunc) DialContext(ctx context.Context, network, addr string) (net.Conn, error)

Jump to

Keyboard shortcuts

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