11.\" Manpage for bssh
22.\" Contact the maintainers to correct errors or typos.
3- .TH BSSH 1 "August 27, 2025 " "v0.5.3" "bssh Manual"
3+ .TH BSSH 1 "December 2024 " "v0.5.3" "bssh Manual"
44
55.SH NAME
6- bssh \- Backend.AI SSH - Parallel command execution across cluster nodes
6+ bssh \- Backend.AI SSH - SSH-compatible client with parallel execution capabilities
77
88.SH SYNOPSIS
99.B bssh
10- [\fI OPTIONS \fR ] [\fI COMMAND_ARGS \fR ...] [\fI COMMAND \fR ]
10+ [\fI OPTIONS \fR ] [\fI destination \fR ] [\fI command \fR [\fI argument \fR ...]]
11+ .br
12+ .B bssh
13+ [\fI OPTIONS \fR ] \fI COMMAND \fR
1114
1215.SH DESCRIPTION
1316.B bssh
14- is a high-performance parallel SSH command execution tool for cluster management, built with Rust.
15- It enables efficient execution of commands across multiple nodes simultaneously with real-time output streaming.
16- The tool provides secure file transfer capabilities using SFTP protocol for both uploading and downloading files
17- to/from multiple remote hosts in parallel. It supports multiple authentication methods including SSH keys (with
18- passphrase support for encrypted keys), SSH agent, and password authentication. It automatically detects Backend.AI
19- multi-node session environments and supports various configuration methods.
17+ is a high-performance SSH client that can be used as a drop-in replacement for standard SSH while also providing
18+ powerful parallel execution capabilities for cluster management. Built with Rust, it supports both single-host
19+ SSH connections (SSH compatibility mode) and multi-server operations (cluster mode).
20+
21+ .B SSH Compatibility Mode:
22+ When used with a single destination (e.g., bssh user@host), bssh behaves like standard SSH, supporting
23+ common SSH options and automatically starting an interactive shell when no command is provided.
24+
25+ .B Multi-Server Mode:
26+ When used with clusters (-C) or multiple hosts (-H), bssh executes commands across multiple nodes
27+ simultaneously with real-time output streaming.
28+
29+ The tool provides secure file transfer capabilities using SFTP protocol, supports multiple authentication
30+ methods (SSH keys with passphrase support, SSH agent, password), and automatically detects Backend.AI
31+ multi-node session environments.
2032
2133.SH OPTIONS
34+
35+ .SS SSH-Compatible Options
36+ .TP
37+ .BR \- i " " \fI identity_file \fR
38+ SSH private key file path (same as ssh -i)
39+
40+ .TP
41+ .BR \- l " " \fI login_name \fR
42+ Specifies the user to log in as on the remote machine (same as ssh -l)
43+
44+ .TP
45+ .BR \- p " " \fI port \fR
46+ Port to connect to on the remote host (same as ssh -p)
47+
48+ .TP
49+ .BR \- o " " \fI option \fR
50+ SSH options in key=value format (e.g., -o StrictHostKeyChecking=no)
51+ Can be specified multiple times
52+
53+ .TP
54+ .BR \- F " " \fI configfile \fR
55+ Specifies an alternative SSH configuration file
56+
57+ .TP
58+ .BR \- q
59+ Quiet mode (suppress non-error messages)
60+
61+ .TP
62+ .BR \- t
63+ Force pseudo-terminal allocation
64+
65+ .TP
66+ .BR \- T
67+ Disable pseudo-terminal allocation
68+
69+ .TP
70+ .BR \- J " " \fI destination \fR
71+ Connect via jump host(s) (ProxyJump) [planned feature]
72+
73+ .TP
74+ .BR \- Q " " \fI query_option \fR
75+ Query SSH configuration options (cipher, kex, mac, key, protocol-version, help)
76+
77+ .TP
78+ .BR \- 4
79+ Force use of IPv4 addresses only
80+
81+ .TP
82+ .BR \- 6
83+ Force use of IPv6 addresses only
84+
85+ .TP
86+ .BR \- x
87+ Disable X11 forwarding
88+
89+ .SS Multi-Server Options
2290.TP
2391.BR \- H " , " \-\- hosts " " \fI HOSTS \fR
2492Comma-separated list of hosts in [user@]hostname[:port] format.
2593Example: user1@host1:2222,user2@host2
2694
2795.TP
28- .BR \- c " , " \-\- cluster " " \fI CLUSTER \fR
29- Cluster name from configuration file
96+ .BR \- C " , " \-\- cluster " " \fI CLUSTER \fR
97+ Cluster name from configuration file (uppercase C for multi-server mode)
3098
3199.TP
32100.BR \-\- config " " \fI CONFIG \fR
33101Configuration file path (default: ~/.config/bssh/config.yaml)
34102
35- .TP
36- .BR \- u " , " \-\- user " " \fI USER \fR
37- Default username for SSH connections
38-
39- .TP
40- .BR \- i " , " \-\- identity " " \fI IDENTITY \fR
41- SSH private key file path. If the key is encrypted, bssh will
42- automatically prompt for the passphrase.
43103
44104.TP
45105.BR \- A " , " \-\- use\- agent
@@ -49,14 +109,15 @@ for authentication. Falls back to key file authentication if the agent
49109is not available or authentication fails.
50110
51111.TP
52- .BR \- P " , " \- \- password
112+ .BR \-\- password
53113Use password authentication. When this option is specified, bssh will
54114prompt for the password securely without echoing it to the terminal.
55115This is useful for systems that don't have SSH keys configured.
56116
57117.TP
58- .BR \- p " , " \-\- parallel " " \fI PARALLEL \fR
59- Maximum parallel connections (default: 10)
118+ .BR \-\- parallel " " \fI PARALLEL \fR
119+ Maximum parallel connections for multi-server mode (default: 10)
120+ Note: -p is now used for port (SSH compatibility)
60121
61122.TP
62123.BR \-\- output\- dir " " \fI OUTPUT_DIR \fR
@@ -213,25 +274,48 @@ Current node's role (main or sub)
213274Note: Backend.AI multi-node clusters use SSH port 2200 by default, which is automatically configured.
214275
215276.SH EXAMPLES
277+
278+ .SS SSH Compatibility Mode (Single Host)
279+ .TP
280+ Connect to a host (interactive shell):
281+ .B bssh user@hostname
282+
283+ .TP
284+ Execute a command:
285+ .B bssh user@hostname "uptime"
286+
287+ .TP
288+ Specify port and key:
289+ .B bssh -p 2222 -i ~/.ssh/key.pem admin@server.com
290+
291+ .TP
292+ Use SSH options:
293+ .B bssh -o StrictHostKeyChecking=no user@host
294+
295+ .TP
296+ Query SSH capabilities:
297+ .B bssh -Q cipher
298+
299+ .SS Multi-Server Mode
216300.TP
217301Execute command on multiple hosts:
218302.B bssh -H "user1@host1,user2@host2" "uptime"
219303
220304.TP
221305Use cluster from configuration:
222- .B bssh -c production "df -h"
306+ .B bssh -C production "df -h"
223307
224308.TP
225309Test connectivity:
226310.B bssh -c production ping
227311
228312.TP
229313Upload file to remote hosts (SFTP):
230- .B bssh -c production upload local_file.txt /tmp/remote_file.txt
314+ .B bssh -C production upload local_file.txt /tmp/remote_file.txt
231315
232316.TP
233317Download file from remote hosts (SFTP):
234- .B bssh -c production download /etc/passwd ./downloads/
318+ .B bssh -C production download /etc/passwd ./downloads/
235319.RS
236320Downloads /etc/passwd from each host to ./downloads/ directory.
237321Files are saved as hostname_passwd (e.g., web1_passwd, web2_passwd)
@@ -247,11 +331,11 @@ Increase verbosity for debugging:
247331
248332.TP
249333Use custom SSH key:
250- .B bssh -i ~/.ssh/custom_key -c staging "systemctl status"
334+ .B bssh -i ~/.ssh/custom_key -C staging "systemctl status"
251335
252336.TP
253337Use SSH agent for authentication:
254- .B bssh -A -c production "systemctl status"
338+ .B bssh -A -C production "systemctl status"
255339
256340.TP
257341Use password authentication:
@@ -262,14 +346,14 @@ Prompts for password interactively
262346
263347.TP
264348Use encrypted SSH key:
265- .B bssh -i ~/.ssh/encrypted_key -c production "df -h"
349+ .B bssh -i ~/.ssh/encrypted_key -C production "df -h"
266350.RS
267351Automatically detects encrypted key and prompts for passphrase
268352.RE
269353
270354.TP
271355Save output to files:
272- .B bssh --output-dir ./results -c production "ps aux"
356+ .B bssh --output-dir ./results -C production "ps aux"
273357.RS
274358Creates timestamped files per node:
275359.br
@@ -288,39 +372,39 @@ Upload configuration file to all nodes:
288372
289373.TP
290374Download logs from all web servers:
291- .B bssh -c webservers download /var/log/nginx/access.log ./logs/
375+ .B bssh -C webservers download /var/log/nginx/access.log ./logs/
292376.RS
293377Each file is saved as hostname_access.log in the ./logs/ directory
294378.RE
295379
296380.TP
297381Upload with custom SSH key and increased parallelism:
298- .B bssh -i ~/.ssh/deploy_key -p 20 -c production upload deploy.tar.gz /tmp/
382+ .B bssh -i ~/.ssh/deploy_key --parallel 20 -C production upload deploy.tar.gz /tmp/
299383
300384.TP
301385Upload multiple files with glob pattern:
302- .B bssh -c production upload "*.log" /var/backups/logs/
386+ .B bssh -C production upload "*.log" /var/backups/logs/
303387.RS
304388Uploads all .log files from current directory to /var/backups/logs/ on all nodes
305389.RE
306390
307391.TP
308392Download logs with wildcard pattern:
309- .B bssh -c production download "/var/log/app*.log" ./collected_logs/
393+ .B bssh -C production download "/var/log/app*.log" ./collected_logs/
310394.RS
311395Downloads all files matching app*.log from /var/log/ on each node
312396.RE
313397
314398.TP
315399Start interactive mode with all nodes:
316- .B bssh -c production interactive
400+ .B bssh -C production interactive
317401.RS
318402Opens an interactive shell session with all nodes in multiplex mode
319403.RE
320404
321405.TP
322406Start interactive mode with single node:
323- .B bssh -c production interactive --single-node
407+ .B bssh -C production interactive --single-node
324408.RS
325409Prompts to select one node for interactive session
326410.RE
@@ -331,7 +415,7 @@ Interactive mode with custom prompt:
331415
332416.TP
333417Interactive mode with initial working directory:
334- .B bssh -c staging interactive --work-dir /var/www
418+ .B bssh -C staging interactive --work-dir /var/www
335419.RS
336420Sets initial working directory to /var/www on all nodes
337421.RE
@@ -460,6 +544,16 @@ Licensed under the Apache License, Version 2.0
460544.BR ssh-keygen (1)
461545
462546.SH NOTES
547+ .SS Breaking Changes (v0.5.3+)
548+ .TP
549+ .B Cluster option changed:
550+ The cluster option has changed from lowercase -c to uppercase -C to avoid conflicts
551+ with SSH's -c (cipher) option. Update your scripts accordingly.
552+ .TP
553+ .B Parallel option changed:
554+ The -p option now specifies port (SSH compatibility). For parallel connections,
555+ use --parallel instead.
556+
463557.SS SFTP Requirements
464558The upload and download commands require SFTP subsystem to be enabled on the remote SSH servers.
465559Most SSH servers have SFTP enabled by default with a configuration line like:
0 commit comments