ssh

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPath = filepath.Join(os.Getenv("HOME"), ".ssh", "config")

Functions

func ParseFile

func ParseFile(path string) (*ssh_config.Config, error)

ParseFile parses an ssh config file NOTE: This manually resolves Include statements due to limitations in the ssh_config library

Types

type Module

type Module struct {
	Config ModuleConfig
}

func NewModule

func NewModule(config ModuleConfig) Module

func (Module) Columns

func (p Module) Columns() []recon.Column

func (Module) Name

func (p Module) Name() string

func (Module) Options

func (p Module) Options() ([]recon.Option, error)

func (Module) OptionsOrCache

func (p Module) OptionsOrCache(maxAge float64) ([]recon.Option, error)

func (Module) SelectOption

func (p Module) SelectOption(option *recon.Option) error

func (Module) Type

func (p Module) Type() string

type ModuleConfig

type ModuleConfig struct {
	// Name is used to override the default module name
	Name string `yaml:"name,omitempty"`

	// DisplayName is a template string to render a custom display name
	DisplayName string `yaml:"display-name"`

	// StartDirectory is a template string that defines the start directory
	StartDirectory string `yaml:"start-directory"`

	// ConfigFile is used in case your ssh config is not in the default location
	ConfigFile string `yaml:"file"`

	// Mode controls how sessions or windows are created for SSH connections
	Mode SSHMode `yaml:"mode"`
}

type SSHMode

type SSHMode string
const (
	SSHSessionMode SSHMode = "session"
	SSHWindowMode  SSHMode = "window"
)

Jump to

Keyboard shortcuts

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