Documentation ¶
Index ¶
- func AuthorizedKey(key ssh.PublicKey) (string, error)
- func DefaultKeyAlgorithms() []string
- func FingerprintMD5(encoding Encoding, key ssh.PublicKey) (string, error)
- func FingerprintSHA1(encoding Encoding, key ssh.PublicKey) (string, error)
- func FingerprintSHA256(encoding Encoding, key ssh.PublicKey) (string, error)
- func GetKeys(ctx context.Context, host string, concurrentWorkers int, timeout time.Duration, ...) (map[string]ssh.PublicKey, error)
- func GetVersion(ctx context.Context, host string) (string, error)
- func SumToHexString(sum []byte) string
- type Encoding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizedKey ¶ added in v1.13.4
AuthorizedKey creates the authorized_key of the provided public key.
func DefaultKeyAlgorithms ¶
func DefaultKeyAlgorithms() []string
DefaultKeyAlgorithms returns the default ssh key algorithms.
func FingerprintMD5 ¶ added in v1.13.4
FingerprintMD5 creates the md5 fingerprint of the provided public key.
func FingerprintSHA1 ¶ added in v1.13.4
FingerprintSHA1 creates the sha1 fingerprint of the provided public key.
func FingerprintSHA256 ¶ added in v1.13.4
FingerprintSHA256 creates the sha256 fingerprint of the provided public key.
func GetKeys ¶
func GetKeys( ctx context.Context, host string, concurrentWorkers int, timeout time.Duration, algorithms ...string, ) (map[string]ssh.PublicKey, error)
GetKeys gets the public keys for a host. Specify the amount of concurrentWorkers and the algorithms that should be used to fetch the keys. If unsure use DefaultKeyAlgorithms.
func GetVersion ¶
GetVersion returns the ssh version of the host.
func SumToHexString ¶ added in v1.13.5
SumToHexString formats a sum in a aa:bb:cc:dd:ee:ff:... pattern.
Types ¶
Click to show internal directories.
Click to hide internal directories.