sshkeys

package
v0.8.22 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package sshkeys turns stored SSH keys into the jokku user's authorized_keys, where every key is bound to "jokku ssh-command".

Index

Constants

This section is empty.

Variables

View Source
var ValidName = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._@-]{0,63}$`)

ValidName matches key names that are safe to embed in a forced command without quoting.

Functions

func Parse

func Parse(line string) (normalized, fingerprint string, err error)

Parse validates a single public key line and returns it normalized (type and base64 only, no comment or options) along with its SHA256 fingerprint.

func Render

func Render(exe string, keys []types.SSHKey) []byte

Render builds the authorized_keys content. exe is the absolute path of the jokku binary on the server.

func Write

func Write(path, exe string, keys []types.SSHKey, owner *Owner) error

Write atomically replaces path with the rendered keys.

Types

type Owner

type Owner struct{ UID, GID int }

Owner is who should own written files; nil leaves ownership alone.

Jump to

Keyboard shortcuts

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