knownhosts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey(host string) ssh.PublicKey

GetKey returns the ssh public key for the given host.

func GetKnownHostsLine

func GetKnownHostsLine(host string) (string, error)

GetKnownHostsLine returns the line to be added to the known_hosts file. The line has the format: host <space> algo <space> base64 encoded public key

func ParseKnownHosts

func ParseKnownHosts(path string) (map[string][]string, error)

ParseKnownHosts creates a host key database from the given OpenSSH host key file. See the sshd manpage for more info: http://man.openbsd.org/sshd#SSH_KNOWN_HOSTS_FILE_FORMAT

Types

This section is empty.

Jump to

Keyboard shortcuts

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