fix(error): add actionable SSH client diagnostics - #294
Merged
Conversation
Distinguish resolver, transport, negotiation, host-key, authentication, channel, command, and timeout failures while preserving their causes. Keep typed client failures through raw streaming so single-host SSH exits 255 and writes exactly one diagnostic. Preserve generic local, Clap, multi-host aggregation, and remote-command exit behavior. Refs #284
Return a typed SSH client error when agent, default-key, and password selection is exhausted so keyless non-interactive sessions keep the OpenSSH exit status and receive method-specific remediation. Make transport tests supply a temporary pre-auth key so they deterministically exercise DNS and TCP failures on keyless runners, and cover authentication diagnostics on stderr and `-E`. Refs #284
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-E, while remote statuses and existing local or multi-host semantics remain unchanged.Validation
cargo test --lib ssh::auth::testscargo test --lib ssh::tokio_client::error::testscargo test --lib commands::exec::testscargo test --test ssh_compat_output_testcargo test --lib ssh::client::connection::tests::test_connect_errorcargo test --lib ssh::client::file_transfer::testscargo check --lib --testscargo clippy --lib --tests -- -D warningscargo fmt --all -- --checkgit diff --checkCloses #284