Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java implementations of SSH?

Reply
Thread Tools

Java implementations of SSH?

 
 
Daniel Pitts
Guest
Posts: n/a
 
      12-03-2008
I've looked at JSch, and it seems like a working candidate, but it
doesn't seem to be written in a thread safe manner, and it hasn't been
javadocced at all. Trilead looks promising as well.

Does anyone have experience with these (or any other) SSH library in
Java? The primary use case is in an automation system, running remote
commands in batch on multiple hosts. The existing system uses
ProcessBuilders and executes "ssh" locally. It is a highly concurrent
application, so any solution we choose *must* be thread safe.

Thanks,
Daniel.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      12-03-2008
On Tue, 02 Dec 2008 20:36:28 -0800, Daniel Pitts
<> wrote, quoted or indirectly
quoted someone who said :

>I've looked at JSch, and it seems like a working candidate, but it
>doesn't seem to be written in a thread safe manner, and it hasn't been
>javadocced at all. Trilead looks promising as well.
>
>Does anyone have experience with these (or any other) SSH library in
>Java? The primary use case is in an automation system, running remote
>commands in batch on multiple hosts. The existing system uses
>ProcessBuilders and executes "ssh" locally. It is a highly concurrent
>application, so any solution we choose *must* be thread safe.


For a list of possibilities see http://mindprod.com/jgloss/ssh.html

Unfortunately I have no recommendations.
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
whose ultimate consequences could be second only to global nuclear war."
~ Environment Canada (The Canadian equivalent of the EPA on global warming)
 
Reply With Quote
 
 
 
 
Daniel Pitts
Guest
Posts: n/a
 
      12-03-2008
bugbear wrote:
> Daniel Pitts wrote:
>> I've looked at JSch, and it seems like a working candidate, but it
>> doesn't seem to be written in a thread safe manner, and it hasn't been
>> javadocced at all. Trilead looks promising as well.
>>
>> Does anyone have experience with these (or any other) SSH library in
>> Java? The primary use case is in an automation system, running remote
>> commands in batch on multiple hosts. The existing system uses
>> ProcessBuilders and executes "ssh" locally. It is a highly concurrent
>> application, so any solution we choose *must* be thread safe.

>
> On a slight tangent strongly multi-threaded applications shell out
> VERY poorly, since all the threads are stopped to perform
> the fork(), then restarted.
>
> Which means if you had (e.g.) a tomcat with a 300 tread process pool,
> shelling out could be ... unfortunate.
>
> DAMHIKT
>
> BugBear

That is exactly one of the reasons I wish to use a Java native SSH
library

Fortunately, the number of active threads is relatively small for the
whole application, and responsiveness isn't a high priority.
Correctness is highest priority (it is a mission critical app).

--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
 
Reply With Quote
 
neuneudr@yahoo.fr
Guest
Posts: n/a
 
      12-12-2008
On Dec 3, 5:47 pm, Daniel Pitts
<newsgroup.spamfil...@virtualinfinity.net> wrote:
> bugbear wrote:
> > Daniel Pitts wrote:
> >> I've looked at JSch, and it seems like a working candidate, but it
> >> doesn't seem to be written in a thread safe manner, and it hasn't been
> >> javadocced at all. Trilead looks promising as well.

>
> >> Does anyone have experience with these (or any other) SSH library in
> >> Java? The primary use case is in an automation system, running remote
> >> commands in batch on multiple hosts. The existing system uses
> >> ProcessBuilders and executes "ssh" locally. It is a highly concurrent
> >> application, so any solution we choose *must* be thread safe.

>
> > On a slight tangent strongly multi-threaded applications shell out
> > VERY poorly, since all the threads are stopped to perform
> > the fork(), then restarted.

....
> That is exactly one of the reasons I wish to use a Java native SSH
> library


I don't know if this could help you but in my case I solved this
problem by creating a (non-portable) script that takes care
of consuming "ssh orders" and warning the Java app every time an
order has been correctly executed.

If I have, say, 3000 scp commands to run, I can launch ten times
the script from Java and give 300 orders to each script.

That way I only ever call ten scripts, when the Java app starts up
and then just communicate with them.

Not native Java but it worked for us.







 
Reply With Quote
 
Daniel Pitts
Guest
Posts: n/a
 
      12-12-2008
wrote:
> On Dec 3, 5:47 pm, Daniel Pitts
> <newsgroup.spamfil...@virtualinfinity.net> wrote:
>> bugbear wrote:
>>> Daniel Pitts wrote:
>>>> I've looked at JSch, and it seems like a working candidate, but it
>>>> doesn't seem to be written in a thread safe manner, and it hasn't been
>>>> javadocced at all. Trilead looks promising as well.
>>>> Does anyone have experience with these (or any other) SSH library in
>>>> Java? The primary use case is in an automation system, running remote
>>>> commands in batch on multiple hosts. The existing system uses
>>>> ProcessBuilders and executes "ssh" locally. It is a highly concurrent
>>>> application, so any solution we choose *must* be thread safe.
>>> On a slight tangent strongly multi-threaded applications shell out
>>> VERY poorly, since all the threads are stopped to perform
>>> the fork(), then restarted.

> ....
>> That is exactly one of the reasons I wish to use a Java native SSH
>> library

>
> I don't know if this could help you but in my case I solved this
> problem by creating a (non-portable) script that takes care
> of consuming "ssh orders" and warning the Java app every time an
> order has been correctly executed.
>
> If I have, say, 3000 scp commands to run, I can launch ten times
> the script from Java and give 300 orders to each script.
>
> That way I only ever call ten scripts, when the Java app starts up
> and then just communicate with them.
>
> Not native Java but it worked for us.
>

Not a bad idea, but doesn't work for our situation. We have a few
scripts that we need to execute on many machines.

--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(non-Java, free software) Fast Infoset implementations? Ivan Shmakov XML 0 12-22-2011 05:17 AM
JAXB implementations Veerle Java 0 10-29-2003 02:16 PM
A List Implementation that satisfies the contract, yet breaks standard implementations! Ant... Java 6 10-28-2003 03:53 PM
JMF Codec implementations? Antti Nummiaho Java 2 10-07-2003 08:38 AM
RTSJ implementations EKL Java 3 08-08-2003 05:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57