pssh

pssh

TLDR

Run a command on two hosts, and print its output on each server inline

>_ pssh -i -H "[host1] [host2]" [hostname -i]
copy

Run a command and save the output to separate files

>_ pssh -H [host1] -H [host2] -o [path/to/output_dir] [hostname -i]
copy

Run a command on multiple hosts, specified in a new-line separated file

>_ pssh -i -h [path/to/hosts_file] [hostname -i]
copy

Run a command as root (this asks for the root password)

>_ pssh -i -h [path/to/hosts_file] -A -l [root_username] [hostname -i]
copy

Run a command with extra SSH arguments

>_ pssh -i -h [path/to/hosts_file] -x "[-O VisualHostKey=yes]" [hostname -i]
copy

Run a command limiting the number of parallel connections to 10

>_ pssh -i -h [path/to/hosts_file] -p [10] '[cd dir; ./script.sh; exit]'
copy

Copied to clipboard
free 100$ digital ocean credit