pydsh(8) - Linux man page

Name

PyDSH

Synopsis

pydsh <options> [command]
pydsh -h | --help

Description

PyDSH is a tool for running a command on a multiple remote hosts in parallel, and to ease the administration of SSH Public/Private keys.

Options

--timeout=<SEC>

Set timeout in seconds.
-v, --verbose
Set the program verbosity. Can be specified up to 5 times to display more information.
--version
Display the programs version and exit.

Host Options

-a, --all

Add all hosts defined in the default host file.
--hostfile=<FILE>
Add all hosts define in file <FILE>.
-i, --ignorefailed
Continue even if some hosts fail connectivity tests.
-n <NODE>, --node=<NODE>
Adds <NODE> to the hostlist. Nodes may be specified as hostnames, or ip addresses (either individually or as a range). Examples: -n localhost -n server1-3 -n 10.1.1.3 -n 172.25.0.14-99
Examples with alternative port declarations: -n localhost:4022 -n server1-3:4022 -n 172.25.0.14-99:21

NOTE: For IP addresses ONLY the last segment is used for determining the range.

Shell Options

--dryrun

Tests the connection to the remote hosts but does not run the command.
--pass

Prompt for password to login account.

--proto=<PROTO>
Connect using Telnet, RSH or SSH (default).

Ssh Options

--ssh_hostkey=<ACTION>

SSH Host key checking. Actions are:
ACCEPT

== Accept all keys offered.

ASK

== Prompt for new/changed keys.

STRICT

== Do not accept new/changed keys.

--ssh_keytype=<TYPE> SSH Private key type, RSA or DSA.
--ssh_pubkiet=<ACTION>
SSH Public key management. Actions are:
GEN

== Generate new SSH Private keys (local system only). INSTALL == Install available keys into remote systems authorized keys file.

REVOKE

== Remove current key from remote systems authorized keys file.

User Options

-s, --sudo

After logging in, switch to root user.
--user=<USER>
User to connect as (default as current user).

Examples Remote Commands

Run uptime on Host1 and Host2: pydsh -n host1 -n host2 uptime -or-

pydsh --node=host1 --node=host2 uptime
Run df -h on the hosts from the default hostfile: pydsh -a -- df -h -or- pydsh -a "df -h"

Run uptime on hosts 192.168.0.1 to 192.168.0.254: pydsh -n 192.168.0.1-254 uptime

Run uptime on hosts Node01 to Node10: pydsh -n Node01-10 uptime

Run uptime on a host1, 192.168.0.1-100, and Node01-10: pydsh -n host1 -n 192.168.0.1-100 --node=Node01-10 uptime

Run uptime as user other than current and prompt for login password: pydsh --user=USER2 --pass -n host1 uptime

Run uptime as root: pydsh -s -a uptime -or- pydsh --sudo -a uptime

Examples Ssh Private Key Management

Generate a new SSH Private Key (RSA): pydsh --ssh_hostkey=GEN --ssh_keytype=RSA

Install current (DSA) key on remote hosts in the default hostlist: pydsh --ssh_hostkey=INSTALL --ssh_keytype=DSA -a

Revoke default (RSA) key from one host: pydsh --ssh_hostkey=REVOKE -n HOST

Authors

Dave Vehrs