ssh

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config      *ClientConfig
	ProxyConfig *ClientConfig
	Timeout     time.Duration
	// contains filtered or unexported fields
}

func Dial

func Dial(config *ClientConfig, timeout time.Duration, proxyConfig *ClientConfig) (*Client, error)

func Get

func Get(config *ClientConfig, timeout time.Duration, proxyConfig *ClientConfig) (*Client, error)

func (*Client) Close

func (p *Client) Close() error

func (*Client) Conn

func (p *Client) Conn() *ssh.Client

func (*Client) DelayClose

func (p *Client) DelayClose(second int) error

func (*Client) NewSession

func (p *Client) NewSession() (*ssh.Session, error)

func (*Client) Put

func (p *Client) Put() error

func (*Client) Reconnect

func (p *Client) Reconnect() error

func (*Client) TryNewSession

func (p *Client) TryNewSession() (sess *ssh.Session, err error)

type ClientConfig

type ClientConfig struct {
	Addr       string
	User       string
	PrivateKey string
}

func (ClientConfig) String

func (p ClientConfig) String() string

Jump to

Keyboard shortcuts

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