I've continued to investigate this issue, and the problem is specific to not having stdin available. I found that I don't see my output when I run this:
/tmp/dropbear-0.52/dbclient -y -i /tmp/id_rsa_db localhost pwd </dev/null or when I do this: /tmp/dropbear-0.52/dbclient -f -y -i /tmp/id_rsa_db localhost pwd But openssh handles lack of stdin just fine, i.e.: ssh localhost pwd < /dev/null will still return the command output. Is this dropbear behavior intentional? If so, does anyone know what I would need to change to fix it? Thanks! Steve On 07/30/2010 02:10 PM, Steven Hein wrote: > I've been using dropbear-0.52 happily for a long time now, but > today I tried to write a shell script to execute multiple > dbclient commands in parallel (backgrounded), capture > their output, and then display it when all dbclient > commands have finished. But I can't seem to capture > any output from the dbclient command. > > The target platform for this is an embedded platform > running busybox....but I boiled it down to a simple > failing case on my Fedora 12 box (I built a brand > new dbclient from the 0.52 tarball). > > > Here's the simple failing case: > > > #! /bin/sh > > (/tmp/dropbear-0.52/dbclient -y -i /tmp/id_rsa_db localhost pwd) > > /tmp/tout & > wait > > > When this script completes, there is nothing in /tmp/tout > > > > When I run this script (same case, just using the openssh client > instead): > > #! /bin/sh > > (ssh localhost pwd) > /tmp/tout & > wait > > > Then I have data in /tmp/out (the output from the 'pwd' command). > > > > > This problem only appears to happen when the dbclient command is run > in the background from within a script. If I run this command > directly from the shell command prompt: > > (/tmp/dropbear-0.52/dbclient -y -i /tmp/id_rsa_db localhost pwd) > > /tmp/tout &; wait > > Then /tmp/tout contains the output of the 'pwd' command. > > > > Has anyone else wrestled with this problem? Any solutions or pointers? > > > Thanks! > Steve > >
