ssh

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 12 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 {
	// contains filtered or unexported fields
}

Client wraps an SSH connection and provides methods for command execution.

func NewClient

func NewClient(cfg *config.SSHConfig) (*Client, error)

NewClient creates a new SSH client from the given SSH config. It returns the client ready for use, or an error if connection fails.

func (*Client) Close

func (c *Client) Close() error

Close terminates the SSH connection.

func (*Client) RunCommands

func (c *Client) RunCommands(commands []string, verbose bool) error

RunCommands executes a sequence of commands in a single SSH session. Commands are joined with "&&" so that failure in any command stops execution. Returns the combined stdout+stderr output and any error.

func (*Client) UploadFile

func (c *Client) UploadFile(entry config.UploadEntry, verbose bool) error

UploadFile copies a local file or directory to a remote destination via SCP over SSH. It validates that the local file exists before attempting upload.

Jump to

Keyboard shortcuts

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