Skip to content

Cyberduck SFTP Client Issues #549

@0x7d8

Description

@0x7d8

I have recently faced some complaints of Cyberduck users, because they werent able to read "big" (~4mb+) files using sftp (russh + russh-sftp). I have done tons of testing and the issue seems to disappear and reappear on the slightest code changes (reading from buffer vs real file), I also had a similar issue with FileZilla, however that was able to be resolved by setting the max packet len to 32k (which im not sure why that fixes it).

The error you get in Cyberduck is the following:
Image
according to logging, this happens after about 10 read requests from cyberduck, each one properly serving the full 32k like it requests.
The Cyberduck source points to https://github.com/hierynomus/sshj/blob/4be5228a4d113af930ddbb2f089ebd14b7e9040c/src/main/java/net/schmizz/sshj/connection/channel/AbstractChannel.java#L386, so likely some issue with data being sent by russh.

Why im making this issue here and not on cyberducks github is because it works fine with other servers (openssh, github.com/pkg/sftp) which points to some issue in russh or russh-sftp.

I have a minimal reproducible example here as a zip (very cursed code, been testing around for a while).
As noted in examples/server.rs, when you comment out the self.file = line, everything seems to work fine (though with very slow transfer speed).
Run via cargo run --example server
https://cdn.rjns.dev/russh.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions