Talk:Dsh

From OLPC
Revision as of 21:42, 13 November 2008 by Kevix (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

I installed dsh on my XS 0.4 test platform, following the instructions on the dsh homepage to compile from source. I already had all the dev tools I needed except for gcc-c++, though I forget if I installed those prior. I had a slight issue with where make install put these libraries:

[root@schoolserver etc]# cd /usr/local/lib
[root@schoolserver lib]# ls
libdshconfig.a   libdshconfig.so    libdshconfig.so.1.0.0
libdshconfig.la  libdshconfig.so.1

Dsh looks for these in /usr/lib, so I just copied them all over to /usr/lib and then dsh worked. Also, it puts dsh.conf in /usr/local/etc instead of /etc/dsh. Not a big deal, just something to remember. I had to edit remoteshell= ssh instead of rsh in dsh.conf.

Additionally, I edited /etc/ssh_config on the XS to say "StrictHostKeyChecking no" to automatically approve the XOs rsa keys.

On the XOs, I had to edit sshd_config for "PubkeyAuthentication yes" It is critical to set the permissions correctly for /home/olpc/.ssh and /home/olpc/.ssh/authorized_keys, otherwise ssh and dsh won't work.

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys


Now the fun of "commanding a legion of XOs!" Here are some little things I've tried:

  • Get a list of the XOs by Buddy name:
dsh -Mac cat /home/olpc/.sugar/default config | grep nickname
  • See how much free space is on the nand:
dsh -Mac df -h | grep mtd0
  • Install an activity (this can probably be condensed into fewer commands):
dsh -Mac wget <link to activity.xo file>
dsh -Mac unzip activity.xo -d /home/olpc/Activities
dsh -Mac rm activity.xo