SSHP(1)

πŸ“¦ version 1.1.5, in nixpkgs unstable

πŸ’… SSHP(1) β€” the parallel ssh page, bestie edition

okay so you found the manpage for sshp, and it lives in the General Commands Manual (that's the SSHP(1) header vibe, iykyk). sit down, grab a strawberry drink πŸ“, and let's get you fluent.

✨ NAME ✨

sshp β€” the Parallel SSH Executor. that's it, that's the whole name. iconic. πŸ‘‘

🌈 SYNOPSIS 🌈

sshp [OPTIONS] <command> [arg ...]

sshp [-f hosts.txt] [-g | -j] <command> [arg ...]

literally just: options, then the command, then its args. or be cute about it and pass -f, and pick either -g or -j. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

Parallel SSH executor and manager. say it with me: executor and manager. πŸ’…

sshp manages multiple ssh processes at once and handles coalescing their output to your terminal. no cap. it reads newline-separated hostnames or IP addresses from standard input (or from a file you pass with -f), then starts up an ssh subprocess for each host. every child's stdout and stderr get written to sshp's own standard output. so you get one big stream of everyone's chaos, but organized. main character energy. ✨

πŸŽ€ MODES πŸŽ€

sshp has three modes of execution, and you will pick one:

  • line mode β€” line-by-line output, and this is the default, bestie.
  • group mode β€” grouped by hostname output, that's -g.
  • join mode β€” grouped by unique output, that's -j.

the first two, line and group, work in largely the same way. the only difference is how the data gets buffered from the child processes and printed to the screen. line mode buffers the data line-by-line, whereas group mode does no buffering at all and prints the data the moment it's read from the child. lowkey simple. 🧚

the last mode, join, is the drama queen though β€” it buffers all data from all child processes and only produces output once every single process has finished. and instead of grouping output by host, it groups identical output together and lists the hosts that produced it. obsessed. πŸ”₯

πŸ’– OPTIONS πŸ’–

  • -a, --anonymous β€” hide that hostname prefix. defaults to false.
  • -c, --color on|off|auto β€” set color output. defaults to auto.
  • -d, --debug β€” enable debug info. defaults to false.
  • -e, --exit-codes β€” show command exit codes. defaults to false.
  • -f, --file file β€” a file of hosts separated by newlines. defaults to stdin.
  • -g, --group β€” group output by hostname (that's group mode).
  • -h, --help β€” print this message and exit.
  • -j, --join β€” join hosts together by output (that's join mode). ⚠️ this option is mutually exclusive with -a, -g, and -s.
  • -m, --max-jobs num β€” max processes to run concurrently. defaults to 50.
  • -n, --dry-run β€” don't actually execute subprocesses. pretend time. πŸ™ˆ
  • -s, --silent β€” silence all output subprocess stdio. defaults to false.
  • -t, --trim β€” trim hostnames (remove domain) on output. defaults to false.
  • -v, --version β€” print the version number and exit.
  • -x, --exec prog β€” program to execute. defaults to ssh.
  • --max-line-length num β€” maximum line length (in line mode only). defaults to 1024.
  • --max-output-length num β€” maximum output length (in join mode only). defaults to 8192.

🧚 SSH OPTIONS 🧚

these get passed directly to ssh, no edits, no notes:

  • -i, --identity ident β€” the ssh identity file to use.
  • -l, --login name β€” the username to login as.
  • -o, --option key=val β€” an ssh option passed in key=value form.
  • -p, --port port β€” the ssh port.
  • -q, --quiet β€” run ssh in quiet mode.

⭐ EXAMPLES ⭐

say your hosts file is called hosts.txt and it looks like this, bestie:

# example hosts file
arbiter.rapture.com
cifs.rapture.com
decomp.rapture.com

sshp -f hosts.txt uname -v

run uname -v in parallel on the hosts supplied by that file. 🌸


sshp -e exit 0 < hosts.txt

parallel ssh into hosts (via stdin) and print the exit codes (-e). πŸ‘‘


sshp -d id -un < hosts.txt

parallel ssh into hosts and run id -un with debug (-d) output enabled. πŸ”


sshp -f hosts.txt -m 1 -g command-to-run

run with -g (group mode) to group the output by hostname as it comes in. setting -m to 1 effectively turns sshp into an ssh serializer. one at a time, no chaos. πŸ’€


sshp -f hosts.txt -j hostname

run with -j (join mode) to group together hosts that produce identical output. slay. ✨


πŸ’œ EXIT STATUS πŸ’œ

  • 0 β€” all child processes exited successfully. πŸŽ‰
  • 1 β€” one or more child processes exited with a non-zero status. 😭
  • 2 β€” incorrect usage, like an unknown option or an invalid hosts file. πŸ™ˆ
  • 3 β€” a system or internal program failure prevented sshp from running.
  • 4 β€” sshp exited after receiving SIGTERM or SIGINT.

🌈 SIGNALS 🌈

  • SIGUSR1 β€” send a SIGUSR1 signal to sshp to print a status message to stdout. a little vibe check, if you will. πŸ“Š
  • SIGINT, SIGTERM β€” terminate running child processes and exit with status 4.
fr fr do not forget: those two mean business, they terminate the running children and bail out with status 4. no cap.

πŸ’€ BUGS πŸ’€

⟨https://github.com/bahamas10/sshp/issues⟩ β€” that's the spot, go report it there. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Dave Eddy (bahamas10) <dave@daveeddy.com> (https://www.daveeddy.com) β€” the icon who made this.

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ“œ LICENSE πŸ“œ

MIT License. periodt. πŸ’…


and that's the whole page, bestie β€” this was the General Commands Manual entry for SSHP(1), dated October 9, 2026, and now you know it through-and-through. go forth and parallelize responsibly 🌸🫢✨

πŸ“¦ where this page comes from