-
Notifications
You must be signed in to change notification settings - Fork 1
Labels
priority:criticalRequires immediate attentionRequires immediate attentionstatus:reviewUnder reviewUnder reviewtype:bugSomething isn't workingSomething isn't working
Description
Root Cause Analysis
In src/commands/interactive/connection.rs:74-76, the password fallback condition:
Err(SshError::KeyAuthFailed)
if allow_password_fallback && atty::is(atty::Stream::Stdin) =>This condition only matches KeyAuthFailed error, but different errors are returned when SSH agent authentication fails:
AgentAuthenticationFailed- SSH agent authentication failed (most common)AgentNoIdentities- No identities in SSH agentAgentConnectionFailed- SSH agent connection failedAgentRequestIdentitiesFailed- Identity request failed
Requested Fix
-
In
establish_connectionfunction insrc/commands/interactive/connection.rs:- Include SSH agent-related authentication failure errors in the password fallback condition
- Extend pattern matching to
SshError::KeyAuthFailed | SshError::AgentAuthenticationFailed | SshError::AgentNoIdentities, etc.
-
Verify error type definitions (
src/ssh/tokio_client/error.rs):- Confirmed that required error types are already defined
-
Post-fix testing:
- Run
cargo check - Run
cargo clippy - Run
cargo test
- Run
Reference Files
src/commands/interactive/connection.rs- Target for modificationsrc/ssh/tokio_client/error.rs- Error type definitionssrc/ssh/tokio_client/authentication.rs- Authentication logic (for reference)
Metadata
Metadata
Assignees
Labels
priority:criticalRequires immediate attentionRequires immediate attentionstatus:reviewUnder reviewUnder reviewtype:bugSomething isn't workingSomething isn't working