openssh-rust / openssh

Scriptable SSH through OpenSSH in Rust
Apache License 2.0
232 stars 35 forks source link

Support russh? #133

Closed NobodyXu closed 1 year ago

NobodyXu commented 1 year ago

russh is a rust implementation of ssh. It's much better than using external ssh to remove dependency on having ssh in environment and ssh also contains a lot of terrible coding practices (global states for arguments and program states) and written in C, so having a Rust implementation is preferred.

I think we could support this by having a feature and a new set of Session(Builder)::new_russh for this.

To keep backwards compatibility, I think we should make openssh::Error opaque and instead have an opaque type with Error::kind() for inspecting the error kind.

jonhoo commented 1 year ago

I would actually recommend against this — the reason I made this crate go via ssh in the first place was specifically so that callers don't have to audit another crypto implementation. Getting crypto right is super hard, and being able to say "all the crypto here is in OpenSSH, which you're likely already using elsewhere" is a feature.

NobodyXu commented 1 year ago

I would actually recommend against this — the reason I made this crate go via ssh in the first place was specifically so that callers don't have to audit another crypto implementation. Getting crypto right is super hard, and being able to say "all the crypto here is in OpenSSH, which you're likely already using elsewhere" is a feature.

Yeah it makes sense, perhaps we can have another crate doing this and integrate with other parts, such as openssh-sftp-client.