Overview
Implement SSH jump host (bastion/proxy) support to enable connections through intermediate SSH servers, supporting the -J option compatible with OpenSSH ProxyJump functionality.
Technical Approach
The implementation leverages russh's open_direct_tcpip_channel capability to create SSH tunnels through jump hosts:
- Connection chaining through nested direct-tcpip channels
- Per-host authentication supporting different methods for each jump
- Connection reuse for multiple operations through same jump chain
- Automatic retry with exponential backoff for resilience
- Full integration with existing authentication and host verification
Implementation Tasks
Phase 1: Core Infrastructure
Phase 2: SSH Client Integration
Phase 3: Multi-Jump Support
Phase 4: Error Handling & Recovery
Phase 5: Multi-Host Mode Integration
Success Criteria
- OpenSSH-compatible -J syntax works identically
- Support 1-5 jump hosts in chain
- Works with all existing bssh commands
- Connection time < 2s for single jump
- Clear error messages showing which jump failed
- Automatic reconnection on transient failures
Examples
# Single jump host
bssh -J jump@bastion user@internal-server
# Multiple jump hosts
bssh -J jump1@host1,jump2@host2 user@final-destination
# With cluster mode
bssh -C production -J bastion@gateway "command"
Labels
enhancement, help wanted, ssh-compat
Overview
Implement SSH jump host (bastion/proxy) support to enable connections through intermediate SSH servers, supporting the -J option compatible with OpenSSH ProxyJump functionality.
Technical Approach
The implementation leverages russh's
open_direct_tcpip_channelcapability to create SSH tunnels through jump hosts:Implementation Tasks
Phase 1: Core Infrastructure
src/jump/mod.rs)Phase 2: SSH Client Integration
Phase 3: Multi-Jump Support
Phase 4: Error Handling & Recovery
Phase 5: Multi-Host Mode Integration
Success Criteria
Examples
Labels
enhancement,help wanted,ssh-compat