Expand description
Shell session handler for interactive SSH sessions.
This module implements the shell session functionality for bssh-server, providing users with interactive login shells through SSH.
§Architecture
A shell session consists of:
- A PTY (pseudo-terminal) pair for terminal emulation
- A shell process running on the slave side of the PTY
- Bidirectional I/O forwarding between SSH channel and PTY master
§I/O Strategy
This module uses russh’s ChannelStream for bidirectional I/O between
the SSH channel and the PTY. The ChannelStream implements AsyncRead
and AsyncWrite, allowing direct data transfer without going through
russh’s Handle::data() message queue. This approach is the same as
used by russh-sftp and avoids event loop synchronization issues.
Structs§
- Shell
Session - Shell session managing PTY and shell process.
Functions§
- run_
shell_ io_ loop - Run the shell I/O loop using ChannelStream for direct I/O.
- run_
shell_ io_ loop_ with_ handle - Run shell I/O loop using Handle for output (instead of ChannelStream).