Documentation
¶
Index ¶
- Constants
- func EnsureHostKeys(keyDir string) error
- type Client
- func (c *Client) CopyTo(ctx context.Context, localPath, remotePath string) error
- func (c *Client) Exec(ctx context.Context, command string) (string, error)
- func (c *Client) ExecWithOutput(ctx context.Context, command string) error
- func (c *Client) Interactive(ctx context.Context) error
- func (c *Client) WaitForSSH(ctx context.Context, maxRetries int) error
- type Config
Constants ¶
View Source
const ( // DefaultKeyPath is the path to the cluster SSH private key inside containers DefaultKeyPath = "/var/run/cluster/cluster.key" // DefaultSSHPort is the port-forwarded SSH port for VMs DefaultSSHPort = "2222" // DefaultSSHUser is the default user for SSH connections DefaultSSHUser = "core" // DefaultSSHHost is the host for port-forwarded SSH connections DefaultSSHHost = "localhost" )
Variables ¶
This section is empty.
Functions ¶
func EnsureHostKeys ¶
EnsureHostKeys checks that SSH keys exist on the host
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides SSH operations for connecting to VMs via containers
func NewClientForNode ¶
NewClientForNode creates a new SSH client for a given node
func (*Client) ExecWithOutput ¶
ExecWithOutput executes a command via SSH, streaming output to stdout/stderr
func (*Client) Interactive ¶
Interactive starts an interactive SSH session
type Config ¶
type Config struct {
ContainerName string // Podman container name
Host string // SSH host (usually "localhost" for port-forwarded VMs)
Port string // SSH port (usually "2222" for port-forwarded VMs)
KeyPath string // Path to SSH private key
User string // SSH user (usually "core")
Logger *logrus.Logger
PodmanClient *podman.Client // Podman client for container operations
}
Config holds SSH client configuration
Click to show internal directories.
Click to hide internal directories.