Class SshConfigResolveOptions
Inputs to Resolve(string, SshConfigResolveOptions?) that come from outside the config file.
public sealed class SshConfigResolveOptions
- Inheritance
-
SshConfigResolveOptions
- Inherited Members
Properties
- Command
The command (with SessionType
exec) or subsystem name (withsubsystem, for examplesftp) the caller will start, forMatch command; null or empty for none, whichMatch command ""matches. Used only when SessionType is set.
- ExecMatcher
Evaluates
Match execcommands (after token expansion): completes with true when the command succeeds. Null (the default) means exec criteria never match, because running commands from a config file is opt-in; for trusted files, run them with RunShellAsync(string, CancellationToken):(command, ct) => new(SshExecMatcher.RunShellAsync(command, ct)). Asynchronous, so a config that needs it resolves with ResolveAsync(string, SshConfigResolveOptions?, CancellationToken).
- GetEnvironmentVariable
Looks up environment variables for
${VAR}expansion. Defaults to the process environment.
- HomeDirectory
The home directory (
~,%d). Defaults to the current user's profile folder.
- HostCanonicalizer
Looks up the canonical name for
CanonicalizeHostname: receives the host and theCanonicalDomainsand completes with the canonical name, or null when none is found. Null (the default) disables canonicalization, since resolving names is the caller's business (DNS,CanonicalizePermittedCNAMEspolicy). Asynchronous, so a config that needs it resolves with ResolveAsync(string, SshConfigResolveOptions?, CancellationToken).
- LocalAddresses
The local addresses for
Match localnetwork. Null (the default) reads the addresses of the network interfaces that are up, as ssh does; set it to decide yourself (or in tests). Note that a network address is not a trustworthy criterion in many situations, as ssh_config(5) warns.
- LocalHostName
The local host name (
%l,%L). Defaults to the machine name.
- LocalUser
The local user name (
%u, and the default remote user). Defaults to the current user.
- Port
A port given explicitly by the caller; overrides
Portin the file.
- SessionType
The kind of session the caller will start, for
Match sessiontype:shell(an interactive shell),exec(a command),subsystem(for example SFTP) ornone(forwarding only,ssh -N). Null (the default) when unknown: aMatchblock withsessiontypeorcommandthen never applies, negated or not, since either answer could be wrong. ssh itself always knows, because the command line says.
- Tag
A tag given by the caller (
ssh -P), matched byMatch tagged; overridesTagin the file.
- User
A user given explicitly by the caller; overrides
Userin the file.