Skip to content

Conversation

@love12yadav
Copy link

This PR fixes SSH authentication issues when using ProxyJump by improving session isolation and connection lifecycle management.

Key changes

Disabled connection reuse when ProxyJump is enabled to prevent authentication state leakage.

Scoped SSH credentials strictly to individual ClientSession instances.

Ensured SSH client resources are properly cleaned up for non-cached sessions.

Prevented mixed authentication attempts that could lead to “Too many authentication failures”.

These changes make SSH connections more stable and predictable, especially in proxy-based environments.

Fixes #3926

…3926)

fix(ssh): isolate SSH identities per session to avoid auth failures

The previous implementation allowed SSH identities to accumulate
across connections when ProxyJump was used, causing mixed
authentication attempts and triggering MaxAuthTries errors.

This change:
- Disables connection reuse for ProxyJump sessions
- Prevents global SSH client identity leakage
- Ensures credentials are applied per ClientSession


Signed-off-by: Love yadav <[email protected]>
Refactor SSH connection handling and authentication process, ensuring proper session management and error handling.

Signed-off-by: Love yadav <[email protected]>
- Disable connection reuse when ProxyJump is enabled
- Scope SSH identities to ClientSession only
- Prevent mixed authentication attempts causing auth failures
- Ensure proper SSH client lifecycle cleanup

Signed-off-by: Love yadav <[email protected]>
@love12yadav love12yadav closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant