sshd

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package sshd contains a flower to configure the OpenSSH sshd server.

To generate host keys, see README.

Since Ubuntu does funky modifications to the OpenSSH default file, we use as reference the OpenSSH default file, that we keep here to ease diffing with a new version.

Workflow:

  • curl --output embedded/sshd_config.upstream --fail --no-progress-meter --location https://github.com/openssh/openssh-portable/raw/master/sshd_config
  • first time:
  • cp embedded/sshd_config.upstream embedded/sshd_config
  • edit embedded/sshd_config to taste and to add template expansion
  • subsequent times:
  • git diff embedded/sshd_config.upstream
  • if any changes in the diff, decide what to incorporate in embedded/sshd_config

Index

Constants

View Source
const (
	SshdConfigSrc = "embedded/sshd_config"
	SshdConfigDst = "/etc/ssh/sshd_config"

	SshHostEd25519KeyDst        = "/etc/ssh/ssh_host_ed25519_key"
	SshHostEd25519KeyPubDst     = "/etc/ssh/ssh_host_ed25519_key.pub"
	SshHostEd25519KeyCertPubDst = "/etc/ssh/ssh_host_ed25519_key-cert.pub"
)
View Source
const Name = "sshd"

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Port int `default:"22"`

	SshHostEd25519Key        string
	SshHostEd25519KeyPub     string
	SshHostEd25519KeyCertPub string
}

type Flower

type Flower struct {
	Inst
	Conf
}

func (*Flower) Configure

func (fl *Flower) Configure() error

func (*Flower) Description

func (fl *Flower) Description() string

func (*Flower) Embedded

func (fl *Flower) Embedded() []string

func (*Flower) Init

func (fl *Flower) Init() error

func (*Flower) Install

func (fl *Flower) Install() error

func (*Flower) String

func (fl *Flower) String() string

type Inst

type Inst struct {
	Fsys fs.FS
}

Jump to

Keyboard shortcuts

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