ssh

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Config Keys
	ConfigSSHConnections = "ssh_connections"
	ConfigSSHKeys        = "ssh_keys"

	// Defaults
	DefaultPort = 22
	DefaultUser = "ubuntu"

	// Validation Limits
	MinPort = 1
	MaxPort = 65535
)

Variables

View Source
var (
	// Errors
	ErrAliasExists      = errors.New("connection alias already exists")
	ErrAliasNotFound    = errors.New("connection alias not found")
	ErrInvalidIP        = errors.New("invalid IP address")
	ErrInvalidPort      = errors.New("invalid port number")
	ErrKeyNotFound      = errors.New("SSH key file not found")
	ErrEmptyAlias       = errors.New("alias cannot be empty")
	ErrInvalidAlias     = errors.New("alias contains invalid characters")
	ErrConnectionFailed = errors.New("failed to establish SSH connection")
)

Functions

func SSHCmd

func SSHCmd() *cobra.Command

SSHCmd represents the base ssh command

Types

type SSHConnection

type SSHConnection struct {
	Alias    string `mapstructure:"alias" json:"alias"`
	KeyPath  string `mapstructure:"key_path" json:"key_path"`
	IP       string `mapstructure:"ip" json:"ip"`
	Username string `mapstructure:"username" json:"username"`
	Port     int    `mapstructure:"port" json:"port"`
}

SSHConnection represents a saved SSH connection configuration

Jump to

Keyboard shortcuts

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