Java SSH libraries?

Discussion in 'Java' started by nooneinparticular314159@yahoo.com, Dec 23, 2009.

  1. Guest

    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!
    , Dec 23, 2009
    #1
    1. Advertising

  2. Guest

    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!
    , Dec 23, 2009
    #2
    1. Advertising

  3. Lew Guest

    On Dec 23, 3:32 pm, ""
    <> wrote:
    > 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>
    ?

    --
    Lew
    Lew, Dec 23, 2009
    #3
  4. Guest

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


    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...
    , Dec 23, 2009
    #4
  5. On Wed, 23 Dec 2009 14:52:59 -0800,
    wrote:

    > 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 ?


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Dec 24, 2009
    #5
  6. nogales Guest

    On 23 dic, 21:32, ""
    <> wrote:
    > 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/

    > Thanks!
    nogales, Dec 24, 2009
    #6
  7. Rob Guest

    On Dec 23, 3:32 pm, ""
    <> wrote:
    > 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.

    On Dec 23, 3:41 pm, ""
    <> wrote:
    > 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)
    Rob, Dec 24, 2009
    #7
  8. Tom Anderson Guest

    On Wed, 23 Dec 2009, wrote:

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

    >
    > 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

    --
    science fiction, old TV shows, sports, food, New York City topography,
    and golden age hiphop
    Tom Anderson, Dec 24, 2009
    #8
  9. Daniel Pitts Guest

    wrote:
    > 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

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
    Daniel Pitts, Dec 26, 2009
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loial
    Replies:
    0
    Views:
    398
    loial
    Feb 3, 2009
  2. loial
    Replies:
    0
    Views:
    403
    loial
    Feb 10, 2009
  3. Tench Johnson
    Replies:
    1
    Views:
    290
    Biff Tannen
    Apr 23, 2010
  4. salamond

    net/ssh in ruby. ssh.exec fails

    salamond, Feb 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    241
    salamond
    Feb 17, 2011
  5. Deepika
    Replies:
    2
    Views:
    208
    Deepika
    Nov 14, 2006
Loading...

Share This Page