PDSH
PDSH is a parallel distributed shell.
PDSH can be used for remote access into a group of laptops from a master laptop. Sugar Activities can be added and removed, as can other software packages. It scales up reasonably well, and doesn't stop learners from using the laptops while a change is being made. To use PDSH with a group of laptops:
- install PDSH, and make an SSH public and private key pair,
- configure the group of laptops to enable SSH,
- issue commands as needed.
Ingredients
- a master laptop,
- a group of other laptops,
- a wireless network, either an access point, mesh, or ad-hoc.
Preparation
This is done once.
Master Laptop
Install PDSH. On an XO laptop or computer running Fedora:
yum install -y pdsh pdsh-mod-dshgroup
Or on a computer running Ubuntu:
apt install pdsh
Make an SSH public and private key pair, if there is not already one created. OpenSSH documentation explains how to do this.
ssh-keygen
Copy the file .ssh/id_rsa.pub for distribution to the other laptops.
Other Laptops
Distribute the SSH public key to the group of laptops, and start the SSH server.
The public key must be added to the .ssh/authorized_keys file. OpenSSH documentation explains how to do this.
The SSH server must be started on each laptop:
chkconfig sshd on service sshd start
These steps can be added to a custom build.
Recipe
This is done as needed.
Start the group of laptops. Record the address or system name of each laptop in the group. There are several methods, such as using Avahi to list the laptops that are awake and connected to the wireless network. Put the addresses in a file named group.
Use PDSH to issue commands to the group as a whole, for example to check the clock on each laptop:
pdsh -w ^group date
The commands can be anything you can do with the Terminal activity; such as make every laptop beep, or change their screen brightness, restart, or shut down.
See Also
We have an old page on our Wiki which describes earlier software, Dsh, which does something similar to PDSH. PDSH is more modern and faster.
For more about PDSH, see UsingPDSH.