Table of Contents

Property UseDnsCanonicalizer

Namespace
SshSharp.Config
Assembly
SshSharp.dll

UseDnsCanonicalizer

Canonicalizes host names with DNS, as ssh does, when the configuration asks for it (CanonicalizeHostname yes or always) and HostCanonicalizer is not set. The host is looked up with each of CanonicalDomains appended, in order, as a fully qualified name (no search list); the first that resolves is the new HostName, and the configuration is read again for it. CanonicalizeMaxDots, CanonicalizeFallbackLocal and CanonicalizePermittedCNAMEs apply as in ssh: the name becomes its CNAME target only when a rule allows that pair. A name ending in a dot is looked up as it is, and an IP address is never canonicalized. The lookups use the system's resolver (Dns), which reports the end of a CNAME chain as ssh's getaddrinfo does, but not the chain's middle; when it reports no canonical name, CNAME rules have nothing to act on and the name stays as found. Off by default: resolving a configuration then makes DNS queries, and needs ResolveAsync(string, SshConfigResolveOptions?, CancellationToken).

public bool UseDnsCanonicalizer { get; init; }

Property Value

bool