diff --git a/pages/common/pssh.md b/pages/common/pssh.md index b34797f02..76c08313a 100644 --- a/pages/common/pssh.md +++ b/pages/common/pssh.md @@ -1,27 +1,27 @@ # pssh -> Parallel ssh program. +> Parallel SSH program. -- Run a command on host1 and host2 to print the date on each server inline: +- Run a command on two hosts, and print its output on each server inline: -`pssh -i -H "{{host1}} {{host2}}" {{date}}` +`pssh -i -H "{{host1}} {{host2}}" {{hostname -i}}` - Run a command and save the output to separate files: -`pssh -H {{host1}} -H {{host2}} -o {{path/to/output_dir}} {{date}}` +`pssh -H {{host1}} -H {{host2}} -o {{path/to/output_dir}} {{hostname -i}}` -- Run a command on each host specified in a new-line separated host file: +- Run a command on multiple hosts, specified in a new-line separated file: -`pssh -i -h {{path/to/hosts_file}} {{date}}` +`pssh -i -h {{path/to/hosts_file}} {{hostname -i}}` -- Run a command as root; asks for root password: +- Run a command as root (this asks for the root password): -`pssh -i -h {{path/to/hosts_file}} -A -l {{root}} {{date}}` +`pssh -i -h {{path/to/hosts_file}} -A -l {{root_username}} {{hostname -i}}` - Run a command with extra SSH arguments: -`pssh -i -h {{path/to/hosts_file}} -x "{{-O VisualHostKey=yes}}" {{date}}` +`pssh -i -h {{path/to/hosts_file}} -x "{{-O VisualHostKey=yes}}" {{hostname -i}}` -- Run a command using a maximum number of concurrent connections: +- 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}}'`