Talk:Dsh: Difference between revisions

From OLPC
Jump to navigation Jump to search
(added wiki markup)
mNo edit summary
 
Line 1: Line 1:
I installed '''dsh''' on my ''XS 0.4''' test platform, following the instructions on [http://www.netfort.gr.jp/~dancer/software/dsh.html.en 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 <code>make install</code> put these libraries:
I installed '''dsh''' on my '''XS 0.4''' test platform, following the instructions on [http://www.netfort.gr.jp/~dancer/software/dsh.html.en 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 <code>make install</code> put these libraries:
[root@schoolserver etc]# cd /usr/local/lib
[root@schoolserver etc]# cd /usr/local/lib
[root@schoolserver lib]# ls
[root@schoolserver lib]# ls
Line 7: Line 7:
'''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 <code>remoteshell= ssh</code> instead of '''rsh''' in '''dsh.conf'''.
'''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 <code>remoteshell= ssh</code> instead of '''rsh''' in '''dsh.conf'''.


Additionally, I edited '''/etc/ssh_config''' on the '''XS''' to say <code>"StrictHostKeyChecking no"</code> to automatically approve the '''XO''s '''rsa''' keys.
Additionally, I edited '''/etc/ssh_config''' on the '''XS''' to say <code>"StrictHostKeyChecking no"</code> to automatically approve the '''XO'''s '''rsa''' keys.


On the '''XO'''s, I had to edit '''sshd_config''' for <code>"PubkeyAuthentication yes"</code> 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.
On the '''XO'''s, I had to edit '''sshd_config''' for <code>"PubkeyAuthentication yes"</code> 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.

Latest revision as of 21:42, 13 November 2008

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