-
Notifications
You must be signed in to change notification settings - Fork 1
fix: Add password fallback and improve SSH debugging for compatibility #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit addresses SSH connection compatibility issues where bssh fails to connect to servers that work with OpenSSH. Changes: - Add password fallback when key authentication fails (matches OpenSSH behavior) - Support RUST_LOG environment variable for debugging - Include russh library logs with -vv flag for SSH troubleshooting - Auto-detect SSH agent when available (without --use-agent flag) - Show module targets in debug logs for better diagnostics The password fallback is automatically triggered in interactive mode when publickey authentication is rejected by the server, prompting for password input just like OpenSSH does. Closes #79
Security & Performance ReviewAnalysis Summary
Prioritized Fix RoadmapStatus: Analysis in ProgressCurrently analyzing:
This comment will be updated with findings. |
Security & Performance Review - Complete AnalysisAnalysis Summary
Security Review ResultsPassword Handling Security: PASS
Credential Exposure Risk: PASS
SSH Agent Auto-detection Logic: PASS (with notes)The change from
Logging Security: PASS
Potential Issues IdentifiedLOW: Password Validation EnhancementFile: LOW: Inconsistent Error ContextFile:
INFO: Debug Log VerbosityFile: Code Quality AssessmentPositive Findings:
Minor Suggestions:
Test Coverage
VerdictAPPROVED with minor suggestions The PR implements password fallback and SSH agent auto-detection correctly:
The changes improve compatibility with servers that require password authentication as fallback, matching OpenSSH's default behavior. Review completed by AI Code Reviewer |
- Change SSH agent auto-detection log from info to debug level - Change password fallback attempt log from info to debug level - Unify error messages for connection failures (consistent format)
Summary
This PR addresses SSH connection compatibility issues where bssh fails to connect to servers that work with OpenSSH (Issue #79).
Problem
Root Cause Analysis
When the server's
authorized_keysdoesn't include the user's SSH public key, OpenSSH automatically falls back to password authentication. bssh was not implementing this fallback behavior.Changes
Password Fallback (
src/commands/interactive/connection.rs)Improved Debug Logging (
src/utils/logging.rs)RUST_LOGenvironment variable for debugging-vvflag now includesrusshlibrary debug logs-vvvflag includes trace-level logs for all SSH componentsSSH Agent Auto-detection (
src/ssh/auth.rs)--use-agentflag)Test Plan
-vvflag shows russh debug logsRUST_LOG=debugworks correctlyRelated Issues
Closes #79