@@ -19,6 +19,7 @@ A high-performance parallel SSH command execution tool for cluster management, b
1919- ** Cross-Platform** : Works on Linux and macOS
2020- ** Output Management** : Save command outputs to files per node with detailed logging
2121- ** Interactive Mode** : Interactive shell sessions with single-node or multiplexed multi-node support
22+ - ** Configurable Timeouts** : Set command execution timeouts with support for unlimited execution (timeout=0)
2223
2324## Installation
2425
@@ -99,6 +100,12 @@ bssh -i ~/.ssh/encrypted_key -c production "df -h"
99100
100101# Limit parallel connections
101102bssh -c production --parallel 5 " apt update"
103+
104+ # Set command timeout (10 seconds)
105+ bssh -c production --timeout 10 " quick-check"
106+
107+ # No timeout (unlimited execution time)
108+ bssh -c staging --timeout 0 " long-running-backup"
102109```
103110
104111### Test connectivity
@@ -197,6 +204,7 @@ defaults:
197204 port : 22
198205 ssh_key : ~/.ssh/id_rsa
199206 parallel : 10
207+ timeout : 300 # Command timeout in seconds (0 for unlimited)
200208
201209# Global interactive mode settings (optional)
202210interactive :
@@ -223,6 +231,7 @@ clusters:
223231 - web2.example.com
224232 - user@web3.example.com:2222
225233 ssh_key : ~/.ssh/prod_key
234+ timeout : 600 # Override default timeout for this cluster
226235 # Cluster-specific interactive settings (overrides global)
227236 interactive :
228237 default_mode : single_node
@@ -251,6 +260,7 @@ Options:
251260 -P, --password Use password authentication (will prompt for password)
252261 --strict-host-key-checking <MODE> Host key checking mode (yes/no/accept-new) [default : accept-new]
253262 -p, --parallel <PARALLEL> Maximum parallel connections [default : 10]
263+ --timeout <TIMEOUT> Command timeout in seconds (0 for unlimited) [default : 300]
254264 --output-dir <OUTPUT_DIR> Output directory for command results
255265 -v, --verbose Increase verbosity (-v, -vv, -vvv)
256266 -h, --help Print help
@@ -287,6 +297,18 @@ bssh -c webservers "sudo systemctl restart nginx"
287297bssh -c production --output-dir ./logs " tail -n 100 /var/log/syslog"
288298```
289299
300+ ### Long-running commands with timeout
301+ ``` bash
302+ # Set 30 minute timeout for backup operations
303+ bssh -c production --timeout 1800 " backup-database.sh"
304+
305+ # No timeout for data migration (may take hours)
306+ bssh -c production --timeout 0 " migrate-data.sh"
307+
308+ # Quick health check with 5 second timeout
309+ bssh -c monitoring --timeout 5 " health-check.sh"
310+ ```
311+
290312### Interactive Mode
291313
292314Start an interactive shell session on cluster nodes:
@@ -504,6 +526,7 @@ See the [LICENSE](./LICENSE) file for details.
504526## Changelog
505527
506528### Recent Updates
529+ - ** v0.5.1 (2025/08/25):** Add configurable command timeout with support for unlimited execution (timeout=0), configurable via CLI and config file
507530- ** v0.5.0 (2025/08/22):** Add interactive mode with single-node and multiplex support, broadcast command, and improved Backend.AI cluster auto-detection
508531- ** v0.4.0 (2025/08/22):** Add password authentication, SSH key passphrase support, modern UI with colors, XDG config compliance, and Debian packaging
509532- ** v0.3.0 (2025/08/22):** Add native SFTP directory operations and recursive file transfer support
0 commit comments