ssh

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientConfig

func CreateClientConfig(keyPath string, user string, clientConfigCallback func(config *ssh.ClientConfig)) (*ssh.ClientConfig, error)

Types

type Callback

type Callback func(session *ssh.Session) bool

type Client

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

func NewClient

func NewClient(name string, keyPath string, user string, address string, sshClientConfigCallback func(config *ssh.ClientConfig)) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Download

func (c *Client) Download(remotePath string, destPath string) error

func (*Client) Init

func (c *Client) Init() error

func (*Client) Run

func (c *Client) Run(before Callback, after Callback, cmds ...string) error

type Commander

type Commander interface {
	Init() error
	Run(before Callback, after Callback, cmds ...string) error
	Download(remotePath string, destPath string) error
}

Jump to

Keyboard shortcuts

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