Property UseAgent
- Namespace
- SshSharp.Extensions.DependencyInjection
- Assembly
- SshSharp.Extensions.DependencyInjection.dll
UseAgent
Whether to offer the keys of the user's SSH agent. Without ConfigAlias, true offers them after
PrivateKeyFiles and PrivateKeys, and null or false does not (the default). With ConfigAlias,
null leaves it to ssh_config (IdentityAgent, as ssh does), false turns the agent off, and true uses the agent below in
place of ssh_config's IdentityAgent (which decides only when there is none). The agent is the one registered in the container
as SshAgent (FromKeys(params SshPrivateKey[]) for keys held in this process); without one, it is the environment's
(FromEnvironmentAsync(CancellationToken)). An agent that is not running is skipped, as ssh skips it.
public bool? UseAgent { get; set; }
Property Value
- bool?