zai-org / zai-org/feedback

[Bug] [SSH workspace] 连接启用多因子认证(MFA/keyboard-interactive)的服务器必然失败:"SSH 认证失败"

Open
#333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2 status: 待评估 type: Bug
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category

文件 / 项目操作 · File / Project ops

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

严重程度 · Severity

阻塞使用 · Blocking (无法使用核心功能 / core function unusable)

复现频率 · Reproducibility

必现 · Always

问题描述 · Description

连接启用了双因子认证的服务器(sshpd 配置 AuthenticationMethods publickey,keyboard-interactive,
)时,公钥认证实际已被服务器接受,但 ZCode 随后必然报
"SSH 认证失败:请检查用户名、密码或私钥配置",无法进入任何交互输入环节。

复现步骤 · Steps to reproduce

任意 sshd 配置 AuthenticationMethods publickey,keyboard-interactive + PAM OTP 模块即可复现,
无需特定服务器。

期望表现 · Expected behavior
  1. ssh2 连接配置支持 keyboard-interactive:收到 info-request 时弹 UI 让用户输入一次性验证码,
    支持失败重试与多轮提示;
  2. 顺带建议:SSH workspace 支持 ~/.ssh/config(IdentityFile/Port/ProxyJump/ControlMaster)
    与 ssh-agent,与系统 ssh 行为对齐。
实际表现 · Actual behavior

[ERROR] client error: {"name":"Error","message":"SSH 认证失败:请检查用户名、密码或私钥配置", "stack":"... at normalizeSSHConnectError (chunk-HTIMU6TZ.js) at Client.onClientError at doNextAuth (app.asar/node_modules/ssh2/lib/client.js:865) at tryNextAuth (client.js:1080) at USERAUTH_FAILURE (client.js:428) ..."}

ZCode 版本 · ZCode version

ZCode 桌面端 3.8.1.5310

设备 / 系统 / 浏览器 · Device / OS / Browser

Windows 10/11 x64

截图 / 录屏 / 日志 · Screenshots / Recordings / Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SSH connection flow around normalizeSSHConnectError and the ssh2 Client.onClientError, doNextAuth, and tryNextAuth frames named in the log. Reproduce against an sshd using publickey,keyboard-interactive and trace the authentication prompts. Done means the workspace presents OTP prompts, supports retries and multiple rounds, and no longer reports a generic authentication failure after public-key acceptance.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.