bssh-russh

Crates.iobssh-russh
lib.rsbssh-russh
version0.56.0
created_at2026-01-24 02:46:30.405469+00
updated_at2026-01-24 02:46:30.405469+00
descriptionTemporary fork of russh with high-frequency PTY output fix (Handle::data from spawned tasks)
homepagehttps://github.com/lablup/bssh
repositoryhttps://github.com/lablup/bssh
max_upload_size
id2065954
size761,374
Jeongkyu Shin (inureyes)

documentation

https://docs.rs/bssh-russh

README

bssh-russh

Temporary fork of russh with high-frequency PTY output fix.

This crate exists solely to address a specific issue where Handle::data() messages from spawned tasks may not be delivered to SSH clients during high-throughput PTY sessions.

The Problem

When implementing SSH servers with interactive PTY support, shell output sent via Handle::data() from spawned tasks may not reach the client. The tokio::select! in russh's server session loop doesn't always wake up promptly for messages sent through the internal mpsc channel.

The Fix

Added a try_recv() batch processing loop before select! to drain pending messages, with a limit of 64 messages per batch to maintain input responsiveness (e.g., Ctrl+C).

Usage

[dependencies]
russh = { package = "bssh-russh", version = "0.56" }

Sync with Upstream

This fork tracks upstream russh releases. To sync with a new version:

cd crates/bssh-russh
./sync-upstream.sh 0.57.0  # specify version

Upstream Status

License

Apache-2.0 (same as russh)

Commit count: 254

cargo fmt