Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(b []byte) (ssh.HostKeyCallback, error)
New creates a host key callback from the given OpenSSH host key file bytes. The returned callback is for use in ssh.ClientConfig.HostKeyCallback. By preference, the key check operates on the hostname if available, i.e. if a server changes its IP address, the host key check will still succeed, even though a record of the new IP address is not available.
Types ¶
type KnownKey ¶ added in v0.4.0
type KnownKey struct {
// contains filtered or unexported fields
}
func ParseKnownHosts ¶ added in v0.4.0
ParseKnownHosts takes a string with the contents of known_hosts, parses it and returns a slice of KnownKey
Click to show internal directories.
Click to hide internal directories.