Method RemoveKeyAsync
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
RemoveKeyAsync(SshPrivateKey, CancellationToken)
Removes one key from the agent (ssh-add -d): one from GetKeysAsync(CancellationToken), or the key a file holds.
public Task RemoveKeyAsync(SshPrivateKey key, CancellationToken cancellationToken = default)
Parameters
keySshPrivateKeycancellationTokenCancellationToken
Returns
Exceptions
- SshException
The agent is not running or does not hold the key (AgentFailed).