openssh

package
v1.3.3-0...-f31c912 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TeleportKey is the name the OpenSSH private key
	TeleportKey = "ssh_host_teleport_key"
	// TeleportKey is the name the OpenSSH cert
	TeleportCert = TeleportKey + "-cert.pub"
	// TeleportOpenSSHCA is the path to the Teleport OpenSSHCA
	TeleportOpenSSHCA = "teleport_openssh_ca.pub"
)
View Source
const DefaultRestartCommand = "systemctl restart sshd"

Variables

View Source
var (

	// SSHDKeysDir is the path to the Teleport openssh keys
	SSHDKeysDir = "openssh"
)

Functions

func WriteKeys

func WriteKeys(keysdir string, id *auth.Identity, cas []types.CertAuthority) error

WriteKeys writes the OpenSSH keys and CA from the Identity and the OpenSSH CA to disk for the OpenSSH daemon to use

Types

type SSHD

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

SSHD is used to update the OpenSSH config

func NewSSHD

func NewSSHD(restartCmd string, checkCmd string, sshdConfigPath string) SSHD

NewSSHD initializes SSHD

func (*SSHD) UpdateConfig

func (s *SSHD) UpdateConfig(u SSHDConfigUpdate, restart bool) error

UpdateConfig updates the sshd_config file if needed and writes the teleport specific configuration

type SSHDConfigUpdate

type SSHDConfigUpdate struct {
	// SSHDConfigPath is the path to the OpenSSH sshd_config file
	SSHDConfigPath string
	// DataDir is the path to the global Teleport datadir
	DataDir string
}

SSHDConfigUpdate is the list of options to be set in the Teleport OpenSSH config

Jump to

Keyboard shortcuts

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