<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: SSH Over Java</title>
	<atom:link href="http://blog.james-carr.org/2006/07/11/ssh-over-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/</link>
	<description>Rants and Musings of an Agile Developer</description>
	<pubDate>Sat, 22 Nov 2008 07:47:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: james</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-89245</link>
		<dc:creator>james</dc:creator>
		<pubDate>Sat, 13 Sep 2008 15:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-89245</guid>
		<description>I think you need 

toServer.flush() 

after:

toServer.write(command.getBytes());  

in your send method. 

Also, not sure what the i counter in:

 for (int i = 0; true; i++) 

in your getServerResponse method is for?

Otherwise, your code was very helpful.  Thank you.  james</description>
		<content:encoded><![CDATA[<p>I think you need </p>
<p>toServer.flush() </p>
<p>after:</p>
<p>toServer.write(command.getBytes());  </p>
<p>in your send method. </p>
<p>Also, not sure what the i counter in:</p>
<p> for (int i = 0; true; i++) </p>
<p>in your getServerResponse method is for?</p>
<p>Otherwise, your code was very helpful.  Thank you.  james</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dip</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-75358</link>
		<dc:creator>dip</dc:creator>
		<pubDate>Wed, 25 Jun 2008 13:27:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-75358</guid>
		<description>I have put some traces in 
line no 68. if (line.contains(TERMINATOR) &#38;&#38; (++count &#62; 1)) { 

but it never executes this trace</description>
		<content:encoded><![CDATA[<p>I have put some traces in<br />
line no 68. if (line.contains(TERMINATOR) &amp;&amp; (++count &gt; 1)) { </p>
<p>but it never executes this trace</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dip</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-75357</link>
		<dc:creator>dip</dc:creator>
		<pubDate>Wed, 25 Jun 2008 13:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-75357</guid>
		<description>Thanks James for your kind reply.
I am a new to Java and trying to implement SSH using your example. 

I am using your code like----
    	con.connect("user", "passwd", "server", 22);
     	System.out.println(con.getServerResponse());
    	if (con.isConnected()) {
    		con.send("ls -l");
        }
        System.out.println(con.getServerResponse());

But I am not receiving any response for the cmd "ls -l"
Plz let me know if my understanding is correct.</description>
		<content:encoded><![CDATA[<p>Thanks James for your kind reply.<br />
I am a new to Java and trying to implement SSH using your example. </p>
<p>I am using your code like&#8212;-<br />
    	con.connect(&#8221;user&#8221;, &#8220;passwd&#8221;, &#8220;server&#8221;, 22);<br />
     	System.out.println(con.getServerResponse());<br />
    	if (con.isConnected()) {<br />
    		con.send(&#8221;ls -l&#8221;);<br />
        }<br />
        System.out.println(con.getServerResponse());</p>
<p>But I am not receiving any response for the cmd &#8220;ls -l&#8221;<br />
Plz let me know if my understanding is correct.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Carr</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-75241</link>
		<dc:creator>James Carr</dc:creator>
		<pubDate>Tue, 24 Jun 2008 12:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-75241</guid>
		<description>@dip TERMINATOR is simply a constant that defines the terminating string in the server output,used to indicate that output is done.</description>
		<content:encoded><![CDATA[<p>@dip TERMINATOR is simply a constant that defines the terminating string in the server output,used to indicate that output is done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dip</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-75238</link>
		<dc:creator>dip</dc:creator>
		<pubDate>Tue, 24 Jun 2008 11:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-75238</guid>
		<description>What is the TERMILATOR doing?? Is it the command prompt? 
I could not get the command prompt in "getServerResponse" method.

Can you plz let me know how to do that</description>
		<content:encoded><![CDATA[<p>What is the TERMILATOR doing?? Is it the command prompt?<br />
I could not get the command prompt in &#8220;getServerResponse&#8221; method.</p>
<p>Can you plz let me know how to do that</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rai</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-68483</link>
		<dc:creator>Rai</dc:creator>
		<pubDate>Tue, 20 May 2008 15:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-68483</guid>
		<description>Thanks for the example! Curl does not support an SSH shell interface. I like your method for handling the response.
Thanks again :)</description>
		<content:encoded><![CDATA[<p>Thanks for the example! Curl does not support an SSH shell interface. I like your method for handling the response.<br />
Thanks again <img src='http://blog.james-carr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blacktek</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-36458</link>
		<dc:creator>Blacktek</dc:creator>
		<pubDate>Tue, 30 Oct 2007 12:52:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-36458</guid>
		<description>This script doesn't execute the commands on the remote server. At least not when I'm testing it with something like this:

---
ssh.connect("usr", "pwd", "host", 22);
ssh.sendSimple("myservice start");
System.out.println(ssh.getServerResponse());
ssh.disconnect();
System.exit(0);
---

I've also used the Exec.java example in jsch and it works otherwise, but then the scripts won't see the needed system variables and I don't know how to convert it to using shell channel instead of exec...</description>
		<content:encoded><![CDATA[<p>This script doesn&#8217;t execute the commands on the remote server. At least not when I&#8217;m testing it with something like this:</p>
<p>&#8212;<br />
ssh.connect(&#8221;usr&#8221;, &#8220;pwd&#8221;, &#8220;host&#8221;, 22);<br />
ssh.sendSimple(&#8221;myservice start&#8221;);<br />
System.out.println(ssh.getServerResponse());<br />
ssh.disconnect();<br />
System.exit(0);<br />
&#8212;</p>
<p>I&#8217;ve also used the Exec.java example in jsch and it works otherwise, but then the scripts won&#8217;t see the needed system variables and I don&#8217;t know how to convert it to using shell channel instead of exec&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhik</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-28299</link>
		<dc:creator>Abhik</dc:creator>
		<pubDate>Sun, 05 Aug 2007 08:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-28299</guid>
		<description>Ah! At last an example which demystifies the JSch Shell IO streams! I have been trying to crack this one for the last two days as I have to do something very similar to what you are doing! 

Thanks very much James!</description>
		<content:encoded><![CDATA[<p>Ah! At last an example which demystifies the JSch Shell IO streams! I have been trying to crack this one for the last two days as I have to do something very similar to what you are doing! </p>
<p>Thanks very much James!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adedib</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-10319</link>
		<dc:creator>Adedib</dc:creator>
		<pubDate>Wed, 11 Apr 2007 13:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-10319</guid>
		<description>I don't really understand where you will call the getServerResponse method ?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t really understand where you will call the getServerResponse method ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eileen</title>
		<link>http://blog.james-carr.org/2006/07/11/ssh-over-java/#comment-344</link>
		<dc:creator>Eileen</dc:creator>
		<pubDate>Tue, 14 Nov 2006 15:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.james-carr.org/?p=26#comment-344</guid>
		<description>thanks for posting this code. the echo is a great idea.</description>
		<content:encoded><![CDATA[<p>thanks for posting this code. the echo is a great idea.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
