Files
tty7/crates
l0ng-ai 9ecccae32e fix(sftp): say why SFTP would not start instead of "Timeout"
Every way an SFTP channel can fail before the protocol starts ended the
same way: the library's 10s request timeout, shown in the Files panel as
"sftp init failed: Timeout". Each has its own cause and fix on the server:

- sshd without a `Subsystem sftp` line answers the request with
  CHANNEL_FAILURE. russh's request_subsystem only sends the request, so
  the refusal went unread and the INIT was sent into a channel nobody
  was listening on.
- A `Subsystem` line naming an sftp-server that is not installed: the
  channel is accepted and then closes without a byte.
- A shell startup file that prints on non-interactive logins puts its
  text where the version reply belongs; read as a packet length it asks
  for gigabytes that never arrive.

The subsystem reply is now read (bounded at 20s), and the first bytes
back are checked to be the header of an SSH_FXP_VERSION packet before
the stream is handed to the library. Each case is reported at once with
what to change on the server; text ahead of SFTP is quoted.

Fixes #1126
2026-10-08 22:56:39 +08:00
..