ssh

package
v1.30.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSSHExecutor

func NewSSHExecutor(ctx context.Context, step core.Step) (executor.Executor, error)

func WithSSHClient

func WithSSHClient(ctx context.Context, cli *Client) context.Context

WithSSHClient creates a new context with client

Types

type Client

type Client struct {
	Shell     string   // Shell for remote command execution
	ShellArgs []string // Shell arguments for remote command execution
	// contains filtered or unexported fields
}

func FromMapConfig

func FromMapConfig(_ context.Context, mapCfg map[string]any) (*Client, error)

func NewClient

func NewClient(cfg *Config) (*Client, error)

func (*Client) NewSession

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

type Config

type Config struct {
	User          string
	Host          string
	Port          string
	Key           string
	Password      string
	StrictHostKey bool     // Enable strict host key checking (defaults to true)
	KnownHostFile string   // Path to known_hosts file (defaults to ~/.ssh/known_hosts)
	Shell         string   // Shell for remote command execution (e.g., "/bin/bash")
	ShellArgs     []string // Additional shell arguments (e.g., -e, -o pipefail)
}

Config represents SSH connection info

Jump to

Keyboard shortcuts

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