feat: add SSH-compatible command-line interface and fix localhost connectivity#25
Merged
Conversation
…nectivity - Add SSH-compatible options (-l, -p, -o, -F, -Q, etc.) for drop-in replacement - Change cluster option from -c to -C to avoid conflicts with SSH options - Implement SSH mode detection for single-host connections (bssh user@host) - Auto-switch to interactive mode when no command provided (like SSH) - Fix authentication fallback to try default SSH keys (~/.ssh/id_rsa, etc.) - Skip SSH agent auto-detection to avoid failures with empty agents - Add -Q option for querying SSH capabilities (cipher, kex, etc.) - Update README and documentation for SSH compatibility - Create GitHub issues for remaining SSH features (PTY, port forwarding, jump hosts, config parsing)
- Add SSH-compatible options section with all new options (-l, -p, -o, -F, -Q, etc.) - Update synopsis to reflect SSH-style usage: bssh [destination] [command] - Change cluster option from -c to -C in all examples - Change parallel option from -p to --parallel in examples - Add SSH compatibility mode examples - Add breaking changes notice for existing users - Update description to emphasize drop-in SSH replacement capability
Fixed last instance of old cluster option in ping command example
- Changed -c to -C for cluster option in download and upload tests - Changed -p to --parallel for parallel option in both test files - Tests now pass with the new SSH-compatible CLI structure
inureyes
added a commit
that referenced
this pull request
Aug 27, 2025
Resolve conflicts by keeping SSH compatibility features from main: - SSH-compatible command-line interface (#25) - Help message when no arguments provided (#20) - Parallel config support fix (#18) All functionality from both branches preserved including: - SSH mode with interactive shell support - Multi-server mode with parallel execution - Proper argument parsing for SSH compatibility - Configuration-based parallel limits
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
This PR adds SSH-compatible command-line interface to bssh, enabling it to work as a drop-in replacement for the standard SSH client while maintaining its powerful multi-server capabilities.
Key Changes
SSH Compatibility Mode
bssh user@host [command]-l,-p,-o,-F,-Q, etc.)ssh://user@host:portCommand-Line Options
-cto-Cto avoid conflicts with SSH-lfor login username (SSH-compatible)-pfor port specification (moved parallel to--parallelonly)-ofor SSH options (e.g.,-o StrictHostKeyChecking=no)-Ffor SSH config file specification-Qfor querying SSH capabilities (cipher, kex, mac, etc.)-t/-Tfor TTY control-4/-6for IP version forcingAuthentication & Connection Fixes
bssh localhostnow works likessh localhost-AflagInteractive Mode
Usage Examples
Testing
All the following now work correctly:
bssh localhost- Interactive session without specifying keybssh localhost whoami- Command executionbssh user@host- SSH-style connectionbssh -i ~/.ssh/key host- Explicit key specificationbssh -Q cipher- Query SSH capabilitiesRelated Issues
Created follow-up issues for remaining SSH features:
Breaking Changes
-cto-C(uppercase)-pis now--parallelonly (to support SSH port option)Migration Guide
For existing users:
-c clusterwith-C clusterin scripts-p Nwith--parallel Nfor parallelism control