ssh

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*ssh.Client
}

func NewClient

func NewClient(config *SessionConfig) (*Client, error)

func (*Client) Exec

func (c *Client) Exec(command string, logWriter io.Writer) error

func (*Client) GetEnv added in v0.21.1

func (c *Client) GetEnv(logWriter io.Writer) ([]string, error)

func (*Client) GetUserUidGid

func (c *Client) GetUserUidGid() (string, string, error)

func (*Client) ReadFile

func (c *Client) ReadFile(filePath string) ([]byte, error)

func (*Client) WriteFile

func (c *Client) WriteFile(content, filePath string) ([]byte, error)

type SessionConfig

type SessionConfig struct {
	Hostname       string
	Port           int
	Username       string
	Password       *string
	PrivateKeyPath *string
}

Jump to

Keyboard shortcuts

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