honzasp / makiko

Asynchronous SSH client library in pure Rust
https://honzasp.github.io/makiko/
The Unlicense
38 stars 3 forks source link

comparison to russh #3

Open rukai opened 1 year ago

rukai commented 1 year ago

This library looks really nice and im trying to compare it against russh. I would appreciate a section in the readme that explains what differentiates makiko from russh.

One difference I can see is that russh also supports writing ssh servers. I'm hoping that makiko focusing on writing clients makes it better for that.

Thanks!

honzasp commented 1 year ago

Hi, this is a good point :) The main difference is in the API, Makiko is a bit lower-level, it never spawns tasks or connects to sockets, so it gives more control to the user. Also, with Makiko, asynchronous events (such as the server's public key or data on a channel) are consumed with a channel-like receiver interface (ClientReceiver, SessionReceiver, ...), but with Russh/Thrussh, you define callbacks with a trait object.

Thrussh also implemented very limited crypto (just a single key exchange algorithm, public key algorithm and cipher), but Russh added support for more, so it now supports almost everything that Makiko supports.

rukai commented 1 year ago

I've been working with russh today and I think it's worth noting that the handler trait is optional. By default it uses channel receivers similar to makiko. if a method is defined on the handler trait then I believe the corresponding message type is no longer sent to the receiver.