Method LockAsync
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
LockAsync(string, CancellationToken)
Locks the agent with passphrase (ssh-add -x): until UnlockAsync(string, CancellationToken), it lists no keys and signs
nothing.
public Task LockAsync(string passphrase, CancellationToken cancellationToken = default)
Parameters
passphrasestringcancellationTokenCancellationToken
Returns
Exceptions
- SshException
The agent is not running or is locked already (AgentFailed).