Java SSH libraries?

  • Thread starter nooneinparticular314159
  • Start date
N

nooneinparticular314159

I'm looking for a java SSH library that I can use in my code. I need
to connect to a system that runs ssh, execute some commands, read the
responses, and *maintain* the connection in order to interact with
it. I've found some postings on this that seem to refer to code
written 5 years ago, but I want something that is actively
maintained. I've also found something called SSHTools that is
actively maintained. But it says in the documentation that it opens a
connection, runs a command, and closes the connection! That's not
very useful. Does anyone have any suggestions of libraries that I can
use that will meet my needs?

Note: The library should be maintained and freely available. Open
source is fine.

Thanks!
 
N

nooneinparticular314159

I should note, I'm looking for code that I can call within my
program. I am not attempting to run an SSH server - the machines I'm
connecting to will be running that. I do need to implement client
functionality, or call something that does that for me.

Thanks!
 
L

Lew

I'm looking for a java SSH library that I can use in my code.  I need
to connect to a system that runs ssh, execute some commands, read the
responses, and *maintain* the connection in order to interact with
it.  I've found some postings on this that seem to refer to code
written 5 years ago, but I want something that is actively
maintained.  I've also found something called SSHTools that is
actively maintained.  But it says in the documentation that it opens a
connection, runs a command, and closes the connection!  That's not
very useful.  Does anyone have any suggestions of libraries that I can
use that will meet my needs?

Note: The library should be maintained and freely available.  Open
source is fine.

Have you looked here:
<http://www.google.com/search?q=Java+SSH+library>
?
 
N

nooneinparticular314159

Have you looked here:

Yes, actually I did that before I posted. Ganymede is apparently not
supported or maintained any more. And SSHTools has the problems that
I described in my original question. One can probably assume that if
I know enough to be able to write the sort of program that might use
this, that I might also know how to use Google...
 
M

Martin Gregorie

Yes, actually I did that before I posted. Ganymede is apparently not
supported or maintained any more. And SSHTools has the problems that I
described in my original question. One can probably assume that if I
know enough to be able to write the sort of program that might use this,
that I might also know how to use Google...

Have you looked here: http://www.openssh.com/java.html

OpenSSH seem to think Ganymede is still OK and they should know if
anybody does.

As to the 'run one command and exit' objection, did you ever stop to
consider what might happen if that command is a shell, e.g. /bin/bash ?
 
N

nogales

I'm looking for a java SSH library that I can use in my code.  I need
to connect to a system that runs ssh, execute some commands, read the
responses, and *maintain* the connection in order to interact with
it.  I've found some postings on this that seem to refer to code
written 5 years ago, but I want something that is actively
maintained.  

'May 2009: Ganymed is back - build 300 is coming up soon!'

-- Quoted from: http://www.cleondra.ch/ssh2/
 
R

Rob

I'm looking for a java SSH library that I can use in my code. I need
to connect to a system that runs ssh, execute some commands, read the
responses, and *maintain* the connection in order to interact with
it. I've found some postings on this that seem to refer to code
written 5 years ago, but I want something that is actively
maintained. I've also found something called SSHTools that is
actively maintained. But it says in the documentation that it opens a
connection, runs a command, and closes the connection! That's not
very useful. Does anyone have any suggestions of libraries that I can
use that will meet my needs?

Note: The library should be maintained and freely available. Open
source is fine.
I should note, I'm looking for code that I can call within my
program.  I am not attempting to run an SSH server - the machines I'm
connecting to will be running that.  I do need to implement client
functionality, or call something that does that for me.

Thanks!

Hi,

I've used Trilead's SSH jar library with very good success. I setup
ssh public/private key to prevent the shell login and was able to
execute script(s) on remote as well as 'scp' files from my local
server to the remote server. Great little product.

Good luck
(no, I don't work for Trilead or anything; just happy with the
product)
 
T

Tom Anderson

Yes, actually I did that before I posted. Ganymede is apparently not
supported or maintained any more. And SSHTools has the problems that I
described in my original question. One can probably assume that if I
know enough to be able to write the sort of program that might use this,
that I might also know how to use Google...

You'd be surprised - hang around this group for a while, and it becomes
clear that this correlation is not as firm as you think.

But still, it was clear from your post that you had made some effort to
look. Lew was just double-checking, because he's thorough like that!

tom
 
D

Daniel Pitts

I should note, I'm looking for code that I can call within my
program. I am not attempting to run an SSH server - the machines I'm
connecting to will be running that. I do need to implement client
functionality, or call something that does that for me.

Thanks!
I found plenty of luck with this website:
http://lmgtfy.com/?q=Java+SSH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top