config

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDisableSSHConfig = "NB_DISABLE_SSH_CONFIG"

	EnvForceSSHConfig = "NB_FORCE_SSH_CONFIG"

	MaxPeersForSSHConfig = 200
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles SSH client configuration for NetBird peers

func New

func New() *Manager

New creates a new SSH config manager

func (*Manager) GetSSHConfigDir

func (m *Manager) GetSSHConfigDir() string

GetSSHConfigDir returns the SSH config directory path

func (*Manager) GetSSHConfigFile

func (m *Manager) GetSSHConfigFile() string

GetSSHConfigFile returns the SSH config file name

func (*Manager) RemoveSSHClientConfig

func (m *Manager) RemoveSSHClientConfig() error

RemoveSSHClientConfig removes NetBird SSH configuration

func (*Manager) SetupSSHClientConfig

func (m *Manager) SetupSSHClientConfig(peers []PeerSSHInfo) error

SetupSSHClientConfig creates SSH client configuration for NetBird peers

type PeerSSHInfo

type PeerSSHInfo struct {
	Hostname string
	IP       string
	FQDN     string
}

PeerSSHInfo represents a peer's SSH configuration information

type ShutdownState

type ShutdownState struct {
	SSHConfigDir  string
	SSHConfigFile string
}

ShutdownState represents SSH configuration state that needs to be cleaned up.

func (*ShutdownState) Cleanup

func (s *ShutdownState) Cleanup() error

Cleanup removes SSH client configuration files.

func (*ShutdownState) Name

func (s *ShutdownState) Name() string

Name returns the state name for the state manager.

Jump to

Keyboard shortcuts

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