sshlib

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaintainSSHConnection

func MaintainSSHConnection(config *Config)

Function to continuously try reconnecting if the SSH connection fails

func PrintBanner

func PrintBanner()

Print the startup banner

func SetupLogging

func SetupLogging(logDir string)

Set up logging

Types

type Config

type Config struct {
	SSHConfig SSHConfig `yaml:"ssh_config"`
}

func LoadConfig

func LoadConfig(filePath string) (*Config, error)

Function to load YAML config

type SSHConfig

type SSHConfig struct {
	Host       string   `yaml:"host"`
	Port       int      `yaml:"port"`
	User       string   `yaml:"user"`
	PrivateKey string   `yaml:"private_key"`
	Tunnels    []Tunnel `yaml:"tunnels"`
}

type Tunnel

type Tunnel struct {
	LocalIP    string `yaml:"local_ip"` // New field to specify local IP
	LocalPort  int    `yaml:"local_port"`
	RemoteIP   string `yaml:"remote_ip"`
	RemotePort int    `yaml:"remote_port"`
}

Jump to

Keyboard shortcuts

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