Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

File Manager repeatedly reconnects when browsing ASUSWRT over Dropbear SSH with SCP Legacy Mode

未关闭
#12 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
backend, devtools

调研方向

Start with src/backend/list-routes.ts, where the report identifies the SFTP channel failure and SSH Exec fallback checks. Reproduce directory browsing against a Dropbear host with SCP Legacy Mode, then inspect how connection state and the listing command affect the fallback. Done means directories can be listed over SSH Exec when SFTP is unavailable without triggering repeated reconnects.

由索引模型根据 Issue 内容生成。

描述

bug
What happened?

The File Manager successfully establishes an SSH connection to an ASUS RT-AX52 Pro running stock ASUSWRT, but attempting to open any directory causes the file session to disconnect and repeatedly reconnect.

This occurs with all tested directories, including /tmp, /etc, and /root.

The SSH terminal works correctly, and remote commands execute successfully through SSH Exec.

The router runs Dropbear and does not appear to include an SFTP server. SCP Legacy Mode is enabled, but directory navigation remains unusable.

I investigated the File Manager source code and found two possible causes:

  1. In src/backend/list-routes.ts, certain SFTP channel failures set sshConn.isConnected = false before calling tryFallbackMethod(). However, the fallback immediately returns HTTP 503 when isConnected is false. A missing SFTP subsystem may therefore prevent fallback to an otherwise working SSH Exec connection.
  2. The fallback runs command ls -la --color=never ''. The router's embedded shell reports -sh: command: not found when the command builtin is invoked interactively. This may make the fallback incompatible with ASUSWRT.
    Neither cause has been conclusively verified as the trigger of the reconnect loop.

Source: https://github.com/Termix-SSH/Plugin-File-Manager/blob/main/src/backend/list-routes.ts

Steps to reproduce
  1. Add an ASUS RT-AX52 Pro running stock ASUSWRT as an SSH host.
  2. Enable the File Manager plugin for the host.
  3. Enable SCP Legacy Mode.
  4. Open the File Manager.
  5. Attempt to navigate into any directory, such as /tmp.
  6. Observe that the file session disconnects and attempts to reconnect instead of displaying directory contents.
What did you expect?

The File Manager should list directories using SSH Exec when the SFTP subsystem is unavailable and SCP Legacy Mode is enabled.
An SFTP subsystem failure should not mark an otherwise working SSH connection as disconnected.
The fallback should also support embedded Linux environments using Dropbear and BusyBox

Termix version

26.10.5

Plugin version

1.1.1

Environment

Termix Desktop on Windows 11 25H2 (local installation). Remote device: ASUS RT-AX52 Pro running stock ASUSWRT with Dropbear SSH and an embedded /bin/sh shell. SCP Legacy Mode enabled.

Logs
No File Manager-specific error logs have been captured yet.
Remote SSH Exec was verified successfully:

ssh -T [email protected] "sh -c 'echo EXEC_OK; ls -ld /tmp'"
EXEC_OK
drwxrwxrwx ... /tmp

The router reports the following when command is invoked in an interactive shell:

-sh: command: not found

Available executables include /usr/sbin/dropbear, /bin/cat, /bin/dd, /bin/tar, and /bin/busybox.
Neither scp nor sftp-server was found in PATH.
Anything else?

This appears to be a compatibility issue affecting embedded Linux devices without an SFTP subsystem.

The following logic may be relevant:

if (isChannelFailure) {
  sshConn.isConnected = false;
  sshConn.sftp = undefined;
}
tryFallbackMethod();

The fallback then checks !sshConn?.isConnected and returns HTTP 503 instead of attempting SSH Exec.

Additionally, the fallback directory listing command is:

command ls -la --color=never '<path>'

It may be worth making this command compatible with minimal BusyBox shells.
I would appreciate support for SCP Legacy Mode on stock ASUSWRT without requiring additional packages or firmware modifications.

Before you submit
  • I searched open and closed issues and this is not a duplicate
  • I am on the latest version, or I said which version I am on
主要语言
TypeScript
星标
1
派生
3
平均合并
1 天 4 小时
30 天内合并 PR
6

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Termix-SSH/Plugin-File-Manager 的其他 Issue

查看 Termix-SSH/Plugin-File-Manager 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。