ssh-agent-lib
A collection of types for writing custom SSH agents as specified by the SSH Agent Protocol Internet Draft.
This makes it possible to utilize remote keys not supported by the default OpenSSH agent.
Example
The following example starts listening on a socket and processing requests.
On Unix it uses ssh-agent.sock Unix domain socket while on Windows it uses a named pipe \\.\pipe\agent.
use UnixListener;
use NamedPipeListener;
use ;
use Message;
;
async
async
Now, point your OpenSSH client to this socket using SSH_AUTH_SOCK environment variable and it will transparently use the agent:
SSH_AUTH_SOCK=ssh-agent.sock
On Windows the path of the pipe has to be used:
SSH_AUTH_SOCK=\\.\pipe\agent
For more elaborate example see the examples directory or crates using ssh-agent-lib.
Note
This library has been forked from sekey/ssh-agent.rs as the upstream seems not be maintained (at least as of 2022).
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you shall be licensed as above, without any additional terms or conditions.