Open tarcieri opened 1 year ago
How about ssh-agent
wire types? Or if not, maybe the Encode
/ Decode
traits could be made public.
@kim splitting out the encoding traits (Decode
/Encode
and Reader
/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
.
ssh-encoding
crateHow about
ssh-agent
wire types? Or if not, maybe theEncode
/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.
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.
actually what would be nice is if we could marshal/unmarshal the wire protocol via an ordinary struct with a derive proc macro
It wouldn't be terribly hard to add custom derive for ssh-encoding
. We already have a similar crate for our der
implementation
I am happy with ssh-encoding
as-is (the agent surface isn't terribly large). Also, async is not an option for me.
I've added ssh-derive
to the list with the goal of supplying custom derive support for ssh-encoding
, namely the Decode
/Encode
traits
About the ssh-agent, the plan would be to bring in https://github.com/wiktor-k/ssh-agent-lib
This is a brainstorming issue for additional crates which could go in this repo.
ssh-derive
ssh-encoding
ssh-key
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.