ssh

package
v0.0.0-...-ff37129 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderAuthorizedKeysEntry

func RenderAuthorizedKeysEntry(options []string, key *Key, comment string)

RenderAuthorizedKeysEntry renders an authorized key file entry for the given key as described in the AUTHORIZED_KEYS FILE section of sshd(8)

Types

type Key

type Key struct {
	// The (SHA256) fingerprint
	Fingerprint string
	// The legacy (MD5) fingerprint
	LegacyFingerprint string `json:"fingerprint"`
	// The entire, base64-encoded key
	Key string `json:"key"`
	// The type of this key, e.g. "ssh-rsa"
	Type string
}

An SSH public key

func LoadKey

func LoadKey(b64key string) (*Key, error)

LoadKey loads a base64-encoded public SSH key

type User

type User struct {
	Id       int    `json:"id"`
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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