LinuxCommandLibrary

ssh-para

Parallel SSH jobs manager with interactive CLI

TLDR

Run a command on multiple hosts
$ ssh-para -H [host1] [host2] [host3] -- echo connection ok
copy
Mass patch with 20 parallel jobs
$ ssh-para -p 20 -f [hostlist.txt] -- 'sudo yum update -y'
copy
Execute a local script on remote hosts
$ ssh-para -p 20 -f [hosts.txt] -s [./myscript] -a status
copy

SYNOPSIS

ssh-para [-p parallelism] [-H hosts... | -f hostfile] -- command

DESCRIPTION

ssh-para enables executing commands and scripts across multiple remote servers simultaneously with interactive real-time output monitoring. It supports pausing, resuming, and aborting jobs, killing stuck connections, configurable parallelism, and log generation. Requires SSH key-based authentication.

PARAMETERS

-p N

Number of parallel SSH connections.
-H HOSTS
Space-separated list of target hosts.
-f FILE
File containing target hostnames, one per line.
-s SCRIPT
Local script to execute on remote hosts.
-a ARGS
Arguments to pass to the script.

HISTORY

ssh-para was created by joknarf and is written in Python.

SEE ALSO

pssh(1), pdsh(1), sake(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard