You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a brainstorming issue for additional crates which could go in this repo.
ssh-cipher
ssh-derive
ssh-encoding
ssh-key
ssh-protocol
Others?
There is no current plan to provide a full SSH protocol in this repo, and we are only looking to provide common functionality which is useful for multiple SSH implementations and use cases outside full SSH protocol implementations, such as interoperating with the SSH key/certificate formats and providing linkage to the respective RustCrypto signing algorithm implementations.
However, with sufficient interest that may change.
How about ssh-agent wire types? Or if not, maybe the Encode / Decode traits could be made public.
If it interests you guys at all, I'm working on an SSH agent library that just provides a reference of the current ssh-agent draft specification, and leaves the actual implementation of the agent to the user. This differs from every rust ssh agent implementation I've seen thus far as the agent protocol itself is completely decoupled from the implementation code. Effectively the user will just impl the trait, and from there it is trivial for the user to make any kind of agent that they want.
It's far from finished (actually what would be nice is if we could marshal/unmarshal the wire protocol via an ordinary struct with a derive proc macro.) I could submit a PR if desired after my code has matured a bit more.
Also here's some code that utilizes the aforementioned trait to implement an SSH agent that supports both windows named pipes and pageant's message copy system:
Are there definitive plans around incorporating or not incorporating the agent protocol in yet? Would the plan still be to bring in https://github.com/wiktor-k/ssh-agent-lib? It would be nice to not have to bring in all of tokio and have options for building an agent client or server with our without async.
I believe this is still the plan. We "just" need time to do it (and time to coordinate with @wiktor-k). We'll sure be happy to put the tokio stuff behind a feature flag as needed.
I wrote a library for ssh-agent types; would you be interested in bringing that in as a stop gap for the full ssh agent library?
Basically just the types defined in https://www.ietf.org/archive/id/draft-ietf-sshm-ssh-agent-10.html + certs (as defined in their scattered RFCs) with each type implementing ssh_encoding::{Encode, Decode}. The bulk of the work was just hunting down the wire format for certificates.
It makes writing custom agent clients or agent implementations pretty trivial.
We (@wiktor-k and I) planned to import ssh-agent-lib over here. It's as complete as it can be and used in the field. We've sorted the license already, and I just need to make the import happen (I'd want to preserve the commit history as much as possible).
Activity
kim commentedon Oct 21, 2022
How about
ssh-agentwire types? Or if not, maybe theEncode/Decodetraits could be made public.tarcieri commentedon Oct 21, 2022
@kim splitting out the encoding traits (
Decode/EncodeandReader/Writer) into their own crate (e.g.ssh-encoding) is a good idea.I'll see if I can do that before the next release of
ssh-key.tarcieri commentedon Oct 23, 2022
#29 extracted an
ssh-encodingcrate1Dragoon commentedon Dec 6, 2022
If it interests you guys at all, I'm working on an SSH agent library that just provides a reference of the current ssh-agent draft specification, and leaves the actual implementation of the agent to the user. This differs from every rust ssh agent implementation I've seen thus far as the agent protocol itself is completely decoupled from the implementation code. Effectively the user will just impl the trait, and from there it is trivial for the user to make any kind of agent that they want.
https://github.com/1Dragoon/supersecretagent/blob/master/agent/src/lib.rs
It's far from finished (actually what would be nice is if we could marshal/unmarshal the wire protocol via an ordinary struct with a derive proc macro.) I could submit a PR if desired after my code has matured a bit more.
Also here's some code that utilizes the aforementioned trait to implement an SSH agent that supports both windows named pipes and pageant's message copy system:
https://github.com/1Dragoon/supersecretagent/blob/master/src/main.rs
I'm intending to add support for unix sockets as well as a few other features as noted in the code's comments.
tarcieri commentedon Dec 6, 2022
It wouldn't be terribly hard to add custom derive for
ssh-encoding. We already have a similar crate for ourderimplementation.Edit:
ssh-deriveis now a thing!kim commentedon Dec 6, 2022
I am happy with
ssh-encodingas-is (the agent surface isn't terribly large). Also, async is not an option for me.tarcieri commentedon Mar 22, 2024
I've addedssh-deriveto the list with the goal of supplying custom derive support forssh-encoding, namely theDecode/Encodetraitsbaloo commentedon Apr 6, 2024
About the ssh-agent, the plan would be to bring in https://github.com/wiktor-k/ssh-agent-lib
jrozner commentedon Jan 21, 2025
Are there definitive plans around incorporating or not incorporating the agent protocol in yet? Would the plan still be to bring in https://github.com/wiktor-k/ssh-agent-lib? It would be nice to not have to bring in all of tokio and have options for building an agent client or server with our without async.
baloo commentedon Jan 22, 2025
I believe this is still the plan. We "just" need time to do it (and time to coordinate with @wiktor-k). We'll sure be happy to put the tokio stuff behind a feature flag as needed.
wiktor-k commentedon Jan 22, 2025
AFAIK it's already behind a flag: https://github.com/wiktor-k/ssh-agent-lib/blob/main/Cargo.toml#L39 it may be badly named or maybe there are some other improvements. We're happy to adjust.
FWIW there already is a blocking client (which doesn't require tokio): https://docs.rs/ssh-agent-lib/latest/ssh_agent_lib/blocking/index.html
Server is a bit more involved and we hadn't have anyone with a use-case but obviously we're not against it.
Yep, that's the real constraint 👍
Have a nice day, folks! 👋
a7g4 commentedon Oct 26, 2025
I wrote a library for ssh-agent types; would you be interested in bringing that in as a stop gap for the full ssh agent library?
Basically just the types defined in https://www.ietf.org/archive/id/draft-ietf-sshm-ssh-agent-10.html + certs (as defined in their scattered RFCs) with each type implementing
ssh_encoding::{Encode, Decode}. The bulk of the work was just hunting down the wire format for certificates.It makes writing custom agent clients or agent implementations pretty trivial.
tarcieri commentedon Nov 5, 2025
It'd be great to have any crate for writing SSH agents. I've wanted such a library for writing an agent backed by hardware tokens.
baloo commentedon Nov 8, 2025
We (@wiktor-k and I) planned to import ssh-agent-lib over here. It's as complete as it can be and used in the field. We've sorted the license already, and I just need to make the import happen (I'd want to preserve the commit history as much as possible).