From 92669ca0e2691ab1387fc681d6e2a2d5f7d236c9 Mon Sep 17 00:00:00 2001 From: Warren Date: Mon, 15 Jun 2026 12:03:56 +0800 Subject: [PATCH] Fix SSH authentication: SSH_MSG_USERAUTH_FAILURE must return auth methods list --- markbase-core/src/ssh_server/auth.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/markbase-core/src/ssh_server/auth.rs b/markbase-core/src/ssh_server/auth.rs index ba7f911..88e1258 100644 --- a/markbase-core/src/ssh_server/auth.rs +++ b/markbase-core/src/ssh_server/auth.rs @@ -62,7 +62,8 @@ impl AuthHandler { } else if method == "publickey" { // Phase 5仅实现password认证,publickey留待Phase 9优化 warn!("Public key auth not implemented in Phase 5"); - Ok(AuthResult::Failure("Public key auth not implemented".to_string())) + // SSH_MSG_USERAUTH_FAILURE必须返回可继续使用的认证方法列表 + Ok(AuthResult::Failure("password".to_string())) } else if method == "none" { // OpenSSH:none认证总是失败(用于查询支持的认证方法) // 返回支持的认证方法列表:password, publickey