Skip to content

Releases: lablup/bssh

v1.6.0

19 Dec 13:02

Choose a tag to compare

Release v1.6.0

This release adds jump host configuration support in config.yaml and improves SSH config integration.

New Features

  • Jump Host Configuration Support in YAML (Issue #115, PR #120)
    • Global defaults level: defaults.jump_host for all clusters
    • Cluster level: clusters.<name>.jump_host for cluster-specific settings
    • Node level: Per-node jump_host in detailed node configuration
    • Environment variable expansion supported (${VAR} or $VAR syntax)
    • Empty string ("") explicitly disables jump host inheritance
    • CLI -J option always takes precedence over configuration

Improvements

  • SSH Config ProxyJump Directive (Issue #117, PR #119)
    • ProxyJump directive from SSH config now properly applied when -J option not specified
    • Priority order: CLI -J > config.yaml jump_host > SSH config ProxyJump
  • Documentation Improvements
    • Added comprehensive jump_host configuration documentation to README.md
    • Updated docs/architecture/ssh-jump-hosts.md with detailed architecture
    • Updated example-config.yaml with all jump_host configuration patterns

Bug Fixes

  • Jump Host Authentication (Issue #116, PR #118)
    • Properly handle empty SSH agent when authenticating through jump hosts
    • Fall back to key-based authentication when agent has no identities
  • Config Fallback (PR #120)
    • Environment variables now properly expanded in jump_host values via expand_env_vars
    • Configuration jump_host properly used in exec and interactive modes
  • Jump Host Error Messages - Improved authentication error messages and documentation

CI/CD Improvements

  • Updated GitHub workflows

Technical Details

  • Added ConfigResolver::resolve_jump_host() method for centralized jump host resolution
  • Jump host priority: CLI > Node > Cluster > Global defaults
  • Comprehensive test coverage: 424 lines of tests for jump_host configuration
  • Integration tests for all priority levels and edge cases

Dependencies

None

Breaking Changes

None

Known Issues

None

What's Changed

  • fix: Jump host authentication fails with empty SSH agent (issue #116) by @inureyes in #118
  • fix: Apply SSH config ProxyJump directive when -J option not specified (issue #117) by @inureyes in #119
  • feat: Add jump_host field support in config.yaml (issue #115) by @inureyes in #120

Full Changelog: v1.5.1...v1.6.0

v1.6.0rc1

19 Dec 11:26

Choose a tag to compare

v1.6.0rc1 Pre-release
Pre-release

Summary

Release candidate for v1.6.0 with jump host configuration support in YAML config files, SSH config ProxyJump directive fixes, and improved jump host authentication handling.

New Features

  • Jump Host Configuration in YAML (Issue #115, PR #120)
    • Global defaults level: defaults.jump_host for all clusters
    • Cluster level: clusters.<name>.jump_host for cluster-specific settings
    • Node level: Per-node jump_host in detailed node configuration
    • Environment variable expansion supported (${VAR} or $VAR syntax)
    • Empty string ("") explicitly disables jump host inheritance
    • CLI -J option always takes precedence over configuration

Improvements

  • SSH Config ProxyJump Directive (Issue #117, PR #119): Apply SSH config ProxyJump directive when -J option not specified
  • Documentation: Added comprehensive jump_host configuration documentation to README.md, architecture docs, and example-config.yaml

Bug Fixes

  • Jump Host Authentication (Issue #116, PR #118): Fix jump host authentication fails with empty SSH agent - properly fall back to key-based authentication
  • Config Fallback: Apply expand_env_vars to jump_host and add config fallback for exec/interactive modes

CI/CD Improvements

  • Updated GitHub workflows

Technical Details

  • Added ConfigResolver::resolve_jump_host() method for centralized jump host resolution
  • Jump host priority: CLI > Node > Cluster > Global defaults
  • Comprehensive test coverage: 424 lines of tests for jump_host configuration
  • Integration tests for all priority levels and edge cases

Dependencies

None

Breaking Changes

None

Known Issues

None

v1.5.1

18 Dec 09:57

Choose a tag to compare

v1.5.1

New Features

None

Improvements

None

Bug Fixes

  • SSH Disconnect Error Handling (Issue #113, PR #114)
    • Handle SshError(Disconnect) during authentication for password fallback
    • Fixed handling of SSH disconnect errors during authentication phase
    • Enables proper password fallback when SSH connection is disconnected during auth

CI/CD Improvements

None

Technical Details

  • Extended auth error matching to include SshError::Disconnect variant
  • Improved robustness of password fallback authentication flow

Dependencies

None

Breaking Changes

None

Known Issues

None

What's Changed

  • fix: Handle SshError(Disconnect) during auth for password fallback (issue #113) by @inureyes in #114

Full Changelog: v1.5.0...v1.5.1

v1.5.0

18 Dec 09:08

Choose a tag to compare

v1.5.0 Pre-release
Pre-release

v1.5.0 Release

This release introduces comprehensive pdsh compatibility mode, hostlist expressions, and TUI improvements.

New Features

  • pdsh Compatibility Mode (Issues #100-103, #105, #107, #110)

    • Full pdsh-style command line compatibility when invoked as pdsh or with --pdsh-compat
    • -w hosts option mapped to -H hosts for target host specification
    • -x hosts option mapped to --exclude hosts for host exclusion
    • -f N option mapped to --parallel N for fanout control
    • -l user option for remote username
    • -t N option mapped to --connect-timeout N for connection timeout
    • -u N option mapped to --timeout N for command timeout
    • -N option mapped to --no-prefix for disabling hostname prefix in output
    • -b option mapped to --batch for single Ctrl+C termination
    • -k option mapped to --fail-fast for stop on first failure
    • -q query mode to show target hosts and exit
    • -S option mapped to --any-failure for returning largest exit code
  • Hostlist Expressions (Issue #107)

    • pdsh-style range expansion: node[1-5] → node1, node2, node3, node4, node5
    • Zero-padded ranges: node[01-05] → node01, node02, node03, node04, node05
    • Comma-separated values: node[1,3,5] → node1, node3, node5
    • Cartesian product: rack[1-2]-node[1-3] → 6 hosts
    • Domain suffix support: web[1-3].example.com
    • User and port preservation: admin@db[01-03]:5432
    • File input with ^/path/to/hostfile
  • In-TUI Log Panel (Issue #106)

    • Toggle visibility with l key
    • Color-coded by level: ERROR (red), WARN (yellow), INFO (white), DEBUG (gray)
    • Configurable buffer size via BSSH_TUI_LOG_MAX_ENTRIES (default: 1000, max: 10000)
    • Panel height adjustable from 3-10 lines with +/- keys
    • Scroll with j/k keys, toggle timestamps with t
  • --fail-fast Option (Issue #103)

    • -k / --fail-fast flag to stop immediately on first failure
    • Compatible with pdsh -k option
    • Cancels pending commands when any node fails
    • Can be combined with --require-all-success for strict error handling
  • --batch Option (Issue #102)

    • -b / --batch flag for single Ctrl+C termination
    • Compatible with pdsh -b option
    • Useful for non-interactive scripts and CI/CD pipelines
  • --exclude Option (Issue #100)

    • --exclude / -x for host exclusion
    • Supports wildcards, glob patterns, and hostlist expressions
    • Applied after --filter option
  • --no-prefix Option (Issue #101)

    • -N / --no-prefix for disabling hostname prefix in output
    • Compatible with pdsh -N option
    • Works with both stream mode and file mode
  • --connect-timeout Option

    • Separate connection timeout from command execution timeout
    • Default: 30 seconds, minimum: 1 second
    • Useful for fast failure detection on unreachable hosts

Improvements

  • CI workflow simplification by merging jobs into single pipeline

Bug Fixes

  • --timeout 0 Handling (Issue #112)

    • Fixed --timeout 0 to correctly treat as unlimited execution time
    • Previously the 0 value was being ignored, causing unexpected timeout behavior
    • Added explicit CLI test to prevent regression
  • Environment Variable Test Race Conditions

    • Added #[serial] attribute to env var tests to prevent race conditions
    • Tests now run sequentially when accessing shared environment state
  • Connect Timeout Propagation

    • Fixed connect_timeout not being propagated through all SSH connection paths

CI/CD Improvements

  • Simplified CI workflow by merging multiple jobs into single pipeline

Technical Details

  • pdsh compatibility layer core infrastructure
  • Comprehensive hostlist expression parser with cartesian product support
  • Added explicit CLI test for --timeout 0 behavior

Dependencies

None

Breaking Changes

None

Known Issues

None

What's Changed

  • feat: Add --no-prefix option to disable hostname prefix in output (pdsh -N compatibility) by @inureyes in #101
  • feat: Add --exclude option for host exclusion (pdsh -x compatibility) by @inureyes in #100
  • feat: Add --batch option for single Ctrl+C termination (pdsh -b compatibility) by @inureyes in #102
  • feat: Add --fail-fast option to stop on first failure (pdsh -k compatible) by @inureyes in #103
  • feat: Implement pdsh compatibility layer core infrastructure by @inureyes in #105
  • feat: Add in-TUI log panel to prevent log messages from breaking layout by @inureyes in #106
  • feat: Add pdsh-style hostlist expression support by @inureyes in #107
  • docs: Add pdsh compatibility mode documentation and installation scripts by @inureyes in #110
  • docs: Restructure ARCHITECTURE.md into modular documentation by @inureyes in #111

Full Changelog: v1.4.2...v1.5.0

v1.4.2

16 Dec 13:24

Choose a tag to compare

v1.4.2

New Features

None

Improvements

None

Bug Fixes

  • PTY Session Terminal Handling (PR #90)
    • Fixed terminal escape sequence responses displayed on first prompt when starting tmux
    • Improved terminal compatibility with multiplexers
  • PTY Session Paste (PR #89)
    • Fixed paste not working in PTY sessions
    • Improved clipboard/paste functionality in interactive terminal sessions

CI/CD Improvements

None

Technical Details

  • Terminal handling improvements for PTY sessions
  • Better compatibility with tmux and terminal multiplexers

Dependencies

  • Bumped dependencies to latest versions

Breaking Changes

None

Known Issues

None

What's Changed

  • fix: paste not working in PTY sessions by @inureyes in #89
  • fix: Terminal escape sequence responses displayed on first prompt when starting tmux by @inureyes in #90

Full Changelog: v1.4.1...v1.4.2

v1.4.1

15 Dec 15:20

Choose a tag to compare

v1.4.1 Release Notes

New Features

None

Improvements

  • TUI Module Documentation (Issue #81, PR #83)
    • Added comprehensive TUI architecture section to ARCHITECTURE.md
    • Enhanced README.md with keyboard shortcuts reference table
    • Added view modes description table
    • Added TUI activation conditions and requirements
    • Added missing "1-9: Jump to node N" shortcut in detail view help text
  • Comprehensive Test Suite (Issue #82, PR #86)
    • tests/tui_snapshot_tests.rs: 20 tests for TUI rendering using ratatui's TestBackend
    • tests/tui_event_tests.rs: 36 tests for keyboard navigation, scroll behavior, and view transitions
    • tests/streaming_integration_tests.rs: 28 tests for NodeStream, MultiNodeStreamManager, and streaming execution
    • benches/large_output_benchmark.rs: Performance benchmarks for large output handling
    • Total: 84 new tests added

Bug Fixes

  • SSH Agent Password Fallback (Issue #84, PR #85)
    • Extended password fallback to handle all SSH agent authentication failures
    • Now correctly triggers for: AgentAuthenticationFailed, AgentNoIdentities, AgentConnectionFailed, AgentRequestIdentitiesFailed
    • Added is_auth_error_for_password_fallback() helper function for testability
    • Added unit tests and integration tests for all error types

CI/CD Improvements

None

Technical Details

  • Added insta 1.34 for snapshot testing
  • Added criterion 0.5 for benchmarking
  • Added mockall 0.12 for mocking in integration tests
  • Refactored test code quality: removed unused functions, replaced panic! with matches! macro
  • Added Unicode test cases (Korean, Chinese, Emoji)
  • Improved assertion messages for better debugging

Dependencies

  • insta 1.34 (dev-dependency)
  • criterion 0.5 (dev-dependency)
  • mockall 0.12 (dev-dependency)
  • cmake 0.1.56 (updated)
  • shell-words 1.1.1 (updated)

Breaking Changes

None

Known Issues

None

What's Changed

  • docs: Add comprehensive TUI module documentation by @inureyes in #83
  • fix: Extend password fallback to handle SSH agent authentication failures by @inureyes in #85
  • test: Add comprehensive tests for TUI and streaming execution by @inureyes in #86

Full Changelog: v1.4.0...v1.4.1

v1.4.0

15 Dec 13:34

Choose a tag to compare

Release v1.4.0

New Features

  • Sudo Password Support (Issue #74, PR #78)
    • -S/--sudo-password flag for automated sudo authentication
    • Securely prompts for sudo password before command execution
    • Automatically detects and responds to sudo password prompts
    • Works with both streaming and non-streaming execution modes
    • BSSH_SUDO_PASSWORD environment variable support (with security warnings)
    • Uses secrecy crate for secure memory handling
    • Password cleared from memory immediately after use

Improvements

  • Password Fallback (PR #80): Improved SSH debugging for better compatibility with enhanced password authentication fallback logic
  • Developer Tooling: Added githooks and setup script for development workflow

Bug Fixes

  • Fixed clippy warnings for useless_vec and same_item_push
  • Improved SSH compatibility with password fallback mechanism

CI/CD Improvements

  • Added setup script for githooks

Technical Details

  • Secure memory handling with secrecy and zeroize crates
  • Automatic sudo prompt detection and response

Dependencies

None

Breaking Changes

None

Known Issues

None

What's Changed

  • feat: Add --sudo-password flag for automated sudo authentication by @inureyes in #78
  • fix: Add password fallback and improve SSH debugging for compatibility by @inureyes in #80

Full Changelog: v1.3.0...v1.4.0

v1.3.0

10 Dec 09:23

Choose a tag to compare

Release v1.3.0

Add interactive TUI with multiple view modes for multi-node operations, multi-node stream management, and fix terminal escape sequence filtering in PTY sessions.

New Features

  • Interactive TUI (Terminal User Interface) (Phase 3 of #68, PR #73)
    • Summary view: All nodes at a glance with progress bars
    • Detail view (1-9): Full output from specific node with scrolling
    • Split view (s): Monitor 2-4 nodes simultaneously
    • Diff view (d): Compare output from two nodes side-by-side
    • Auto-scroll (f): Toggle automatic scrolling
    • Navigation: Arrow keys, PgUp/PgDn, Home/End
    • Help (?): Show keyboard shortcuts
    • Press q to quit
  • Multi-node Stream Management (Phase 2 of #68, PR #71)
    • Real-time output modes for multi-node operations
    • Stream mode with [node] prefixes for real-time monitoring
    • Enhanced streaming infrastructure for real-time updates

Improvements

  • Implemented ratatui-based TUI rendering
  • Added multi-node output aggregation and display
  • Performance optimizations for real-time output streaming
  • Enhanced logging and error handling

Bug Fixes

  • PTY Escape Sequence Filtering (PR #77)
    • Filter terminal escape sequence responses in PTY sessions
    • Fixed issue with terminal response codes appearing in output

CI/CD Improvements

None

Technical Details

  • Phase 1 (#69): Real-time command output streaming infrastructure
  • Phase 2 (#71): Multi-node stream management and output modes
  • Phase 3 (#73): Interactive TUI with multiple view modes
  • Added comprehensive tests for backpressure and error handling
  • Improved panic safety and backpressure handling in streaming

Dependencies

  • Updated multiple dependencies via cargo update (tokio, clap, etc.)

Breaking Changes

None

Known Issues

None

What's Changed

  • feat: Implement real-time command output streaming (Phase 1 of #68) by @inureyes in #69
  • Revert "feat: Implement real-time command output streaming (Phase 1 of #68)" by @inureyes in #70
  • feat: Add multi-node stream management and output modes (Phase 2 of #68) by @inureyes in #71
  • feat: Add interactive TUI with multiple view modes (Phase 3 of #68) by @inureyes in #73
  • fix: Filter terminal escape sequence responses in PTY sessions by @inureyes in #77

Full Changelog: v1.2.2...v1.3.0

v1.2.2

29 Oct 01:21

Choose a tag to compare

Bug Fixes

Backend.AI Auto-detection Improvements (#66, #67)

  • Fixed Backend.AI environment auto-detection to properly distinguish between SSH single-host mode and multi-node command execution
  • Added comprehensive host detection heuristics:
    • Special hostname detection: localhost, localhost.localdomain
    • IPv4 address validation: 127.0.0.1, 192.168.x.x, etc.
    • User@host format detection (contains @)
    • Host:port format detection (contains :)
    • SSH URI format detection (starts with ssh://)
    • FQDN detection (multiple . and no spaces)
    • IPv6 format detection (starts with [)
  • Users can now naturally use bssh localhost "command" in Backend.AI environments
  • IPv4 addresses now work directly without special syntax

Improvements

Host Detection Logic

  • Extracted testable looks_like_host_specification() function for better maintainability
  • Added is_ipv4_address() helper with strict validation (4 octets, each 0-255)
  • Performance optimized with early returns for most common patterns
  • Added 16 comprehensive unit tests covering all detection patterns and edge cases

Documentation

  • Updated ARCHITECTURE.md with detailed host detection heuristics documentation
  • Added usage examples for SSH single-host mode in Backend.AI environments
  • Documented detection order and performance optimizations

Technical Details

Test Coverage

  • Added 16 new tests for host specification detection
  • Total test count: 402 tests (all passing)
  • Test categories:
    • IPv4 validation (valid and invalid patterns)
    • Localhost variations
    • User@host, host:port, SSH URI formats
    • FQDN and IPv6 detection
    • Edge cases (empty strings, invalid inputs, special characters)
    • Performance verification (early return optimization)
    • Internationalized domain names

Implementation Details

  • Heuristic-based approach balances pragmatism and safety
  • Early return optimization: most common patterns checked first
  • localhost check: O(1) string comparison
  • IPv4 validation: O(4) = O(1) split + parse
  • Overall performance impact: < 1μs per call

Files Modified

  • src/app/initialization.rs: Added detection functions
  • src/app/initialization_tests.rs: Added comprehensive tests
  • src/app/mod.rs: Added test module reference
  • src/main.rs: Changed cli to mut cli for initialization
  • ARCHITECTURE.md: Updated documentation

Example Usage

export BACKENDAI_CLUSTER_HOSTS="node1,node2,node3"

# SSH single-host mode (all now work!)
bssh localhost "whoami"              # ✅ 1 node
bssh 127.0.0.1 "whoami"              # ✅ 1 node
bssh 192.168.1.100 "whoami"          # ✅ 1 node
bssh user@host "whoami"              # ✅ 1 node
bssh host:22 "whoami"                # ✅ 1 node
bssh server.example.com "whoami"     # ✅ 1 node

# Multi-node mode (still works)
bssh "whoami"                        # ✅ 3 nodes

CI/CD Improvements

None

Dependencies

None

Breaking Changes

None

Known Issues

Simple Hostname Limitation: Simple hostnames without indicators (e.g., bssh myserver "command") cannot be automatically distinguished from commands. Use one of these methods:

  • bssh user@myserver "command" (add user@)
  • bssh myserver:22 "command" (add port)
  • bssh -H myserver "command" (explicit -H flag)

This limitation is minimal as localhost and all IP addresses now work directly.

What's Changed

  • fix: Add host detection heuristic for Backend.AI auto-detection (#66) by @inureyes in #67

Full Changelog: v1.2.1...v1.2.2

v1.2.1

28 Oct 08:42

Choose a tag to compare

Bug Fixes

  • Password Authentication Fallback in Interactive Mode (PR #65)

    • Re-implemented password authentication fallback logic for interactive mode
    • Fixed issue where password prompt was not appearing after key-based authentication failed
    • Ensured proper authentication flow in interactive sessions
  • Test Race Condition (commit d2e8ce9)

    • Added #[serial] attribute to tests calling RankDetector to prevent environment variable race conditions
    • Tests now run sequentially when accessing shared environment state
    • Prevents intermittent test failures due to concurrent environment variable access

New Features

None

Improvements

None

CI/CD Improvements

None

Technical Details

This is a maintenance release focused on fixing authentication and testing issues:

  1. Password Authentication: The interactive mode now properly falls back to password authentication when SSH key authentication fails, matching the behavior of the exec mode.

  2. Test Stability: Fixed race conditions in tests that access shared environment variables by ensuring sequential execution of environment-dependent tests.

Dependencies

None

Breaking Changes

None

Known Issues

None

What's Changed

  • fix: Re-implement password authentication fallback in interactive mode by @inureyes in #65

Full Changelog: v1.2.0...v1.2.1