ssh_config

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: BSD-3-Clause, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hop

type Hop struct {
	HostName string
	Port     int
	*ssh.ClientConfig
}

Hop holds information needed to establish a single SSH hop

type SSHConfig

type SSHConfig struct {
	Alias           string
	User            string
	HostName        string
	Port            int
	KeyCheck        keyCheck
	IdentityFiles   []string
	KnownHostsFiles []string
	Ciphers         []string
	Macs            []string
	HostKeyAlgos    []string
	KexAlgos        []string
	Jumps           []*jumpSpec
}

SSHConfig represents an SSH config read from, e.g., ~/.ssh/config

func ParseSSHConfig

func ParseSSHConfig(alias, user string) (*SSHConfig, error)

func (*SSHConfig) EnsureUser

func (sc *SSHConfig) EnsureUser()

func (*SSHConfig) ToHops

func (sc *SSHConfig) ToHops() ([]Hop, error)

ToHops creates an ordered series of Hops from an SSHConfig

Jump to

Keyboard shortcuts

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