ssh

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Console

func Console(host, user, keyPath string) error

Console replaces the current process with an interactive SSH session.

func Exec

func Exec(ctx context.Context, host, user, keyPath string, command []string) (int, error)

Exec runs a command on the remote host via SSH and returns its exit code.

func Output

func Output(ctx context.Context, host, user, keyPath string, command []string) ([]byte, error)

Output runs a command on the remote host via SSH and returns its stdout.

func TestAuth

func TestAuth(ctx context.Context, host, user, keyPath string) error

TestAuth runs a quick SSH connection test (ssh ... true) to verify key-based authentication works. Returns nil on success.

func WaitProvisioned

func WaitProvisioned(ctx context.Context, host, user, keyPath string, timeout time.Duration) error

WaitProvisioned polls the remote host until /root/.devtools-provisioned exists.

func WaitReady

func WaitReady(ctx context.Context, host string, timeout time.Duration, log io.Writer) error

WaitReady polls the host's SSH port until it accepts connections or the timeout expires. If log is non-nil, progress is written every 5 seconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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