ssh

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 14 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 {
	ClientConfig *ssh.ClientConfig
	// contains filtered or unexported fields
}

func NewWithAgent

func NewWithAgent(hostname string, port int, username string, debug bool) (*Client, error)

func NewWithPassword

func NewWithPassword(hostname string, port int, username string, password string) (*Client, error)

func NewWithPrivateKey

func NewWithPrivateKey(hostname string, port int, username string, privateKeyFilename string, privateKeyPassphrase string) (*Client, error)

func (*Client) Capture

func (c *Client) Capture(command string) (string, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) Execute

func (c *Client) Execute(command string) error

func (*Client) ExecuteInteractively

func (c *Client) ExecuteInteractively(command string, inputMap map[string]string) error

func (*Client) NewSession

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

func (*Client) RequestPty

func (c *Client) RequestPty(session *ssh.Session) error

func (*Client) SetProperty

func (c *Client) SetProperty(key, value string)

func (*Client) Upload

func (c *Client) Upload(localPath string, remotePath string, permission string, debug bool) error

Jump to

Keyboard shortcuts

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