<div dir="ltr">Maybe the local java can run an expect script that connects to the remote system. Expect is well suited to capture interactive sessions.<div class="gmail_extra"><br><a href="http://en.wikipedia.org/wiki/Expect">http://en.wikipedia.org/wiki/Expect</a><br>
<br><div class="gmail_quote">On Mon, Nov 4, 2013 at 9:53 AM, Dave Cramer <span dir="ltr"><<a href="mailto:davecramer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">davecramer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">I forgot to add one criteria, I do not want the client end to run Java, these are small machines, so something written in C or with a much smaller footprint than java would be nice<div><br></div><div>I've tried jsch, getting the end of the stream is a PITA. I am going to play around with a custom prompt to mark the end.</div>
<span class=""><font color="#888888">

</font></span></div><div class="gmail_extra"><span class=""><font color="#888888"><br clear="all"><div>Dave Cramer</div></font></span><div><div class="h5">
<br><br><div class="gmail_quote">On Mon, Nov 4, 2013 at 9:29 AM, Mauro Souza <span dir="ltr"><<a href="mailto:thoriumbr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">thoriumbr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr"><div>I found online two ways to do this with java+ssh:<br><a href="http://zerioh.tripod.com/ressources/sockets.html" target="_blank">http://zerioh.tripod.com/ressources/sockets.html</a><br></div><div><a href="http://www.jcraft.com/jsch/examples/" target="_blank">http://www.jcraft.com/jsch/examples/</a><br>




<br></div><div>Take a look, people sais those examples works and are interesting...<br></div></div><div class="gmail_extra"><br clear="all"><div>Mauro<br><a href="http://mauro.limeiratem.com" target="_blank">http://mauro.limeiratem.com</a> - registered Linux User: 294521<br>




Scripture is both history, and a love letter from God.</div><div><div>
<br><br><div class="gmail_quote">2013/11/4 Dave Cramer <span dir="ltr"><<a href="mailto:davecramer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">davecramer@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div dir="ltr">I'd like to get various pieces of information such as iptables from a machine remotely, using a java program.<div><br></div><div>One option is to use ssh to make calls, but determining when it is done is problematic. IE you can wait for a certain amount of time for all of the output, but that just seems fraught with problems.</div>






<div><br></div><div>Another option is to use NRPE or the like to make calls remotely.</div><div><br></div><div>Is there something out there that does this already ?</div><span><font color="#888888"><div><br clear="all">

<div>Dave Cramer</div>
</div></font></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>