PyDSH - The Python Distributed Shell

DESCRIPTION:

  PyDSH is a simple remote administration toolkit, consisting of two tools: 
  pydsh and pydcp. The pydsh command allows you to run a command on multiple 
  hosts in parallel over RSH, SSH or Telnet, OR you can manage your SSH public 
  keys with functions to help you generate, install and revoke.  The pydcp
  command is used for copying files to/from multiple hosts using SCP. 

STATUS:

  pydsh is functional for sending commands, and managing SSH Keys.
  pydcp supports sending and receiving files and directories (recursive).

WHY PYDSH?

Key functions of Pydsh:
1.  Allows for one command to be run on multiple hosts at once.
2.  Easy host range declarations.
3.  Easy SSH Key management on local and remote hosts.
4.  Easy file coping to and from remote hosts.
5.  Shell commands work with SSH, RSH and Telnet.
6.  Improve output layout.

COMPARISONS TO OTHER TOOLS:

Pydsh is a remote admin tool inspired by the following GPL projects:
1.  DSH (http://sourceforge.net/projects/dsh)
2.  DSSH (http://dssh.subverted.net/)
3.  DCMD (http://sourceforge.net/projects/dcmd)


DCMD hasn't been updated since July 3, 2003 but is (was) fairly complete 
feature wise.  

DSH does not have any support for SSH Key management, telnet, host range 
declarations or SCP.  According to its freshmeat page, DSH has not been updated
since July 17, 2003.

DSSH does remote shell and SCP but no SSH key management or easy declaring
host ranges.

HOST FILES:

Host files are stores in the /etc/pydsh/group/ directory.  The file format is a
for each host to be listed on a line by itself.  For example:

    hostA
    hostB
    hostC
    localhost

The "-a" command line option is a shortcut to the all group, this group is
created at installation with localhost defined in it.
       
PYDSH EXAMPLES:

  Run uptime on Host1 and Host2:

    pydsh -n host1 -n host2 uptime
         or
    pydsh --node=host1 --node=host2 uptime   
         or
    pydsh --node=host1-2 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:
    
    pydsh --user=USER2 -n host1 uptime
    
  Run uptime as root:
   
    pydsh -s -a uptime
         or
    pydsh --sudo -a uptime

PYDCP EXAMPLES:

  Copy one file to home directory on all remote hosts:

    pydcp -a --scp_mode=send --scp_local=./filename 

  Copy one file to the /tmp/cache directory on all remote hosts:

    pydcp -a --scp_mode=send --scp_local=./filename --scp_remote=/tmp/cache/

TODO

  1.  Build config file parsing.
  2.  Tool to build host group files.
      A.  Determine way for single host alternate port configuration.
  3.  Better progress indicator when loop is running.
  4.  Self install script.
      A.  Test for deps.
  5.  deb package.
  6.  rpm package.
  7.  Add post install to rpm/deb to build ALL file.

KNOWN BUGS/ISSUES

  1.  Display updates during SSH key install/revoke
  2.  Assumes that same shell (BASH or SH) is installed and selected as default
      for connecting user accounts on all nodes.
