Categorygithub.com/xor-gate/sshfp
modulepackage
0.0.0-20200411085609-13942eb67330
Repository: https://github.com/xor-gate/sshfp.git
Documentation: pkg.go.dev

# README

SSHFP resolver for Golang

License Gopkg ReportCard Build Coverage

NOTE: Package is functional but not production ready! It requires at least Golang 1.12 with Go modules

The sshfp project is a Golang implementation of SSH fingerprints stored in SSHFP DNS records which can be used together with golang.org/x/crypto/ssh.Client using a custom HostKeyCallback with modular caching. Learn more about the DNS SSHFP record type on Wikipedia.

At least go 1.12 is required

This package is based on the awesome Golang DNS package from github.com/miekg/dns.

And implements at least the following RFCs:

LICENSE

MIT

# Packages

No description provided by the author
No description provided by the author

# Functions

AlgorithmFromSSHPublicKey calculates the Algorithm based on the ssh.PublicKey.Type() (ssh.KeyAlgo* string).
NewMemoryCache creates a new in-memory cache.
NewResolver creates a new DNS SSHFP resolver.
ParseHostname parses the hostname into a url.URL it automaticlly appends the SSHURLScheme when not the hostname is not prefixed with a scheme.
ParseZone parses a RFC 1035 zonefile and creates a slice of Entry elements.
WithCache sets a Cache for the Resolver.
WithDNSClientConfigFromFile loads a resolv.conf(5) like file.
WithDNSClientConfigFromReader works like WithDNSClientConfigFromFile but takes an io.Reader as argument.

# Constants

golint: nolint.
golint: nolint.
golint: nolint.
golint: nolint.
golint: nolint.
SSHURLScheme is the URL scheme for SSH hostname urls.
golint: nolint.
golint: nolint.
golint: nolint.

# Variables

ErrHostKeyChanged when the SSH server host key has changed.
ErrInvalidURLScheme when the hostname URL scheme is invalid.
ErrNoDNSServer when no DNS servers is available.
ErrNoHostKeyFound when no host key is found in DNS (or cache).

# Structs

Entry
Entry wraps a DNS SSHFP entry used for caching.
MemoryCache is a in-memory cache.
Resolver resolves DNS SSHFP records.

# Interfaces

Cache for DNS SSHFP entries.

# Type aliases

Algorithm of the host public key.
Entries for a single Hostname.
ResolverOption for Resolver.
Type of the fingerprint checksum.