client

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSSHKeys = []string{
	"~/.ssh/id_dsa.pub",
	"~/.ssh/id_ecdsa.pub",
	"~/.ssh/id_ecdsa_sk.pub",
	"~/.ssh/id_ed25519.pub",
	"~/.ssh/id_ed25519_sk.pub",
	"~/.ssh/id_rsa.pub",
}

DefaultSSHKeys is based on `man ssh` -i identity_file default values

Functions

func CertInfo

func CertInfo(cert string) (principals []string, before uint64, keyType string, err error)

CertInfo extract principals and expiration from SSH certificate

func CertKeyTypeIsBuggy added in v0.7.1

func CertKeyTypeIsBuggy(s string) bool

CertKeyTypeIsBuggy returns true if certificate key type is buggy with some versions of openssh client/server combination, see discussion for more details : https://github.com/signmykeyio/signmykey/pull/138

func CertKeyTypeIsDeprecated added in v0.7.1

func CertKeyTypeIsDeprecated(s string) bool

CertKeyTypeIsDeprecated returns true if certificate key type is deprecated by openssh

func CertStillValid

func CertStillValid(path string) bool

CertStillValid checks if the certificate is not expired.

func FindUserPubKeys added in v0.7.0

func FindUserPubKeys(keys []string) ([]string, error)

FindUserPubKeys checks every pubkey in `keys` list and returns only existsing keys (or error if all pubkeys don't exist)

func GetUserPubKey

func GetUserPubKey(key string) (string, error)

GetUserPubKey returns user's SSH public key as string.

func Sign

func Sign(addr, user, password, pubKey, otp string) (certificate string, err error)

Sign is used to sign an SSH key with user/password combination.

func UserPubKeyExists

func UserPubKeyExists(key string) (string, error)

UserPubKeyExists checks if public key file exists.

func WriteUserSignedKey

func WriteUserSignedKey(signedKey string, key string) (err error)

WriteUserSignedKey writes user certificate on disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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