Xymon Mailing List Archive search

custom script fails when I add ssh command

list Oliver
Fri, 16 Dec 2011 09:42:50 -0500
Message-Id: <user-168f833b4775@xymon.invalid>

On Thu, Dec 15, 2011 at 8:04 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid> wrote:
I think ssh is "draining" the input stream, which in this case means the
pipeline coming into the while loop.  Try redirecting the ssh input stream
from /dev/null:

      /usr/bin/ssh bwadmin@${MACHINE} "hostname" < /dev/null

I tested that with this command line:

     ls | while read a; do ssh 192.168.1.4 hostname < /dev/null ; done

and got back the remote host name once for each file in the local directory.
Yes - that fixed everything.  Thank you so much for the replying.