sshx

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(s *config.Server, opts DialOptions) (*ssh.Client, error)

Dial opens an SSH client for the given server entry.

func Download

func Download(client *ssh.Client, remotePath, localPath string) error

Download copies remotePath to localPath via SFTP.

func Run

func Run(client *ssh.Client, command string) (int, error)

Run executes a remote command and streams stdout/stderr to the local process.

func Shell

func Shell(client *ssh.Client) error

Shell starts an interactive login shell with PTY.

func Upload

func Upload(client *ssh.Client, localPath, remotePath string) error

Upload copies localPath to remotePath via SFTP (SCP-compatible usage).

Types

type DialOptions

type DialOptions struct {
	Timeout  time.Duration
	Insecure bool // skip host key verification (not recommended)
}

DialOptions controls SSH connection behavior.

Jump to

Keyboard shortcuts

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