-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite distant-ssh2
using russh
(native Rust)
#193
Comments
@baoyachi if you are asking if this is planned, then yes, it is. It is in the 1.0 milestone, meaning that it could be worked on at any point between now and the release of 1.0. |
Also look at https://www.rfc-editor.org/rfc/rfc4254#page-14 which defines the v2 spec of ssh. It highlights things like extended data for stderr. |
And https://github.com/Miyoshi-Ryota/async-ssh2-tokio/blob/main/src/client.rs as an example of authentication, server validation, and process execution. If we can extend this to support sftp, it should cover all needs. |
Check out https://www.rfc-editor.org/rfc/rfc4251#page-8 for data type formats. Data Type Representations Used in the SSH Protocolsbyte
boolean
uint32
uint64
string
mpint
name-list
|
Some parts of sftp were wrapped to be more comfortable, particularly reading a file, which sftp exposes through specifying a maximum length to read and an offset. Two things:
See how libssh does it by checking out sftp_read and sftp_readdir. Our own wrapper around wezterm-ssh uses the implementation of |
Good. 👍 |
AspectUnk/russh-sftp#4 (comment) if you need any help with russh integration let me know, I'm very interested in your project |
Thanks! Still haven't gotten to it yet. Was reading how to handle a pty using russh since I also need to support that. |
There are a lot of problems with the ssh libraries we're using today. They're unreliable, error-prone, and inconsistent. This ignores the build complexity that they introduce as well.
russh is a Rust-native implementation of ssh, which should ideally work as a client to other SSHD implementations. The core library is lacking sftp support, but we could use russh-sftp for inspiration, even though it only supports the server-side portion of sftp.
The specification for sftp (version 3) doesn't seem that complex to implement, so this could be worth pursuing.
The text was updated successfully, but these errors were encountered: