Files
Nexus/docs/changelog/2026-06-21-ssh-preset-materialize.md
T
r 45ca57bf3f fix(ssh): 连接前从 preset_id 解析 SSH 密码
修复宝塔批量引导因仅关联密码预设、行内 password 为空而全部 ssh_command_failed。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 09:47:22 +08:00

848 B
Raw Blame History

Changelog — SSH 预设凭据解析修复(2026-06-21)

日期2026-06-21

摘要

修复仅设置 preset_id、未复制 password 字段时 SSH/宝塔批量引导全部失败(ssh_command_failed)。

动机

任务 #113 等 10/10 失败:服务器关联密码预设「商城默认密码」,但 asyncssh_pool 只读行内 password,未解析预设。

涉及文件

  • server/infrastructure/ssh/resolve_server_auth.py(新)
  • server/infrastructure/ssh/asyncssh_pool.pyacquire 前物化凭据
  • server/infrastructure/btpanel/ssh_bootstrap.pyssh_no_credentials 错误码
  • tests/test_resolve_server_auth.py

迁移 / 重启

  • 需重启 API 容器

验证

.venv/bin/pytest tests/test_resolve_server_auth.py tests/test_btpanel_*.py -q
# 重跑宝塔批量 SSH 获取 API