Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First of all there is pdsh which is essentially a parallel distributed shell which may execute commands on a list of given hosts. However, I find myself in an IPv6 only problem setting. It seems that pdsh is not able to use IPv6, as I am getting error messages:

pdsh -w ^hostnames my_command
pdsh@myhost: gethostbyname("foobar") failed

I also tried to use IPv6 addresses only, which also didn't work. So how do you run a single shell script for administrative purpose (no SGE stuff, or similar) on a bunch of hosts that is IPv6 reachable only?

share|improve this question
It seems to be a somewhat active project. So you file a bug report. – Michael Hampton Oct 26 '12 at 16:06
gethostbyname is the old IPv4-only way to resolve a hostname. The code needs fixing :-) – Sander Steffann Oct 26 '12 at 16:23
From pdsh-users mailing list: "If you use ssh protocol instead, ssh should be resolving hostnames instead of pdsh, so that could be a workaoround at this time." – sendmoreinfo Feb 5 '13 at 7:51

ClusterSSH can SSH into multiple hosts and replicate your keystrokes to all or a subset of the hosts you have connected to. It works on Linux and a couple of UNIXes. ClusterSSH can be used interactively or you can supply a command to run on the remote host using the -a flag. However, as far as I know, it requires an X server because it is a GUI application.

On my system, it uses OpenSSH to open the SSH connection so it is able to reach IPv6-only destinations.

share|improve this answer

Assuming you have ssh daemons running, and they've been bound to the IP6 interface (/etc/ssh/sshd_config ListenAddress) The following shell script should more or less do what you want:

for  hostName in `cat serverList.txt`
    (ssh userName@$hostName  'command' &) 2>&1 >> "${hostname}.log"

See also:

share|improve this answer

I like Dancer's Shell / Distributed Shell:

Since it uses SSH, if your hosts are reachable over IPv6 and run sshd then you'll be fine.

It's packaged in Debian and Ubuntu at least.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.