Skip to content

feat(servers): 已登记服务器可重新登录(换 IP / 密码) - #14

Open
momijineko wants to merge 4 commits into
Bencibr:mainfrom
momijineko:cursor/server-relogin-reset-key-859c
Open

momijineko wants to merge 4 commits into
Bencibr:mainfrom
momijineko:cursor/server-relogin-reset-key-859c

Conversation

@momijineko

Copy link
Copy Markdown
Contributor

Summary

已登记的远程服务器换 IP 或换密码时,不必删掉重加。详情页新增「重新登录」:可改地址 / 端口 / 用户名并重新输入密码或密钥,同一条记录上恢复专用密钥 tokenme_ed25519 并清退避。

指纹与已记录 pin 不一致时,先确认再发送密码/私钥。

Changes

  • Backend: server_reauth_probe / server_reauth_apply(只跑 keygen→pubkey→reconnect→clear_pw;ack_mismatch 门禁)
  • Frontend: 详情错误框与页脚「重新登录」;表单可改 host/port/user;name 只读
  • Browser fixture + i18n(中/英)

Test plan

  • pnpm exec tsc --noEmit
  • Browser ?srv=preset: 失败机 edge-node → 重新登录 → 改 IP → 密码 → 信任 → 成功;列表仍只有一条 edge-node
  • Real Tauri/SSH e2e

Fork PR: momijineko#3

cursoragent and others added 4 commits November 16, 2026 12:45
Add a same-id reauth path so a registered box that moved IP (or needs a
new password) can restore the dedicated key without creating a second
server record. Detail sheet exposes Re-login; probe/apply rewrite the
pubkey, update host/user/fingerprint, and clear backoff.

Co-authored-by: 紅葉猫 <momijineko@users.noreply.github.com>
When the presented fingerprint differs from the pin for this server id,
reauth_probe now closes the connection before authenticate. The UI must
ack the mismatch and re-probe with ack_mismatch before any password or
user key is sent.

Co-authored-by: 紅葉猫 <momijineko@users.noreply.github.com>
Require expected_fingerprint with ack_mismatch so a TOCTOU host-key swap
cannot inherit approval. Keep the alt-panel dedicated-key path across the
confirm re-probe, and surface post-ack auth failures on the credential step.

Co-authored-by: 紅葉猫 <momijineko@users.noreply.github.com>
After the host key is accepted for an attempt, a rejected password must
not report mismatch — that sent the UI back to the trust screen and hid
the credential error. Prefer probeError over mismatch in the sheet.

Co-authored-by: 紅葉猫 <momijineko@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants