hostkey

package
v1.11.58 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_KEYTYPE = "rsa"

Variables

This section is empty.

Functions

func CertFile

func CertFile(sshDir string, keyType KeyType) string

CertFile returns the path to the ssh host certificate based on the keyType

func PubKey

func PubKey(file string, n int) ([]byte, error)

PubKey reads the content of file, until a non-nil error and upto n times each retry sleeps for a second

func PubKeyFile

func PubKeyFile(sshDir string, keyType KeyType) string

PubKeyFile returns the path to the public key of the host key type passed in

Types

type KeyType

type KeyType int
const (
	Rsa KeyType
	Ecdsa
	Ed25519
)

func (KeyType) MarshalJSON

func (s KeyType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (*KeyType) UnmarshalJSON

func (s *KeyType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmashals a quoted json string to the enum value

Jump to

Keyboard shortcuts

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