HELP: Java ssh library - unstable connection

Y

Yaneeve

I am using the com.sshtools.j2ssh.SshClient class in order to connect
to a remote machine. Once the remote machine is rebooted this class
does not recognize the fact that it is no longer connected (in other
words: isConnected() returns an answer of true) trying to disconnect
the connection at this stage (invocation of disconnect()) causes my
program to hang! Since this is a free and no longer supported library,
I fear that it is not I that am doing anything wrong but the ssh
library. Does anybody recognize this behavior? If so I would
appreciate a proposed solution. On the other hand I would even more
appreciate a recommendation for another (MORE STABLE) ssh/sftp library!
 
R

Roedy Green

I am using the com.sshtools.j2ssh.SshClient class in order to connect
to a remote machine. Once the remote machine is rebooted this class
does not recognize the fact that it is no longer connected (in other
words: isConnected() returns an answer of true) trying to disconnect
the connection at this stage (invocation of disconnect()) causes my
program to hang! Since this is a free and no longer supported library,
I fear that it is not I that am doing anything wrong but the ssh
library. Does anybody recognize this behavior? If so I would
appreciate a proposed solution. On the other hand I would even more
appreciate a recommendation for another (MORE STABLE) ssh/sftp library!

The problem is, on the packet net, there is no connection to get
broken. If there are no packets going back and forth, neither end
knows there is a potential problem.

I handled this is one app I did by sending dummy heart beat packets
every X seconds if there was no other recent traffic, in other words
after X seconds of silence. That way each end knows if it hears no
traffic for X+n seconds something has gone wrong with the connection.

I believe there is now a feature in TCP/IP where you can have this
done for your automatically. Perhaps it is also available in SSH.
 
Y

Yaneeve

Thanks!
I was hoping to avoid getting my hands dirty with the lower end
protocols...
 
M

medianet24

I am using the com.sshtools.j2ssh.SshClient class in order to connect
to a remote machine. Once the remote machine is rebooted this class
does not recognize the fact that it is no longer connected (in other
words: isConnected() returns an answer of true) trying to disconnect
the connection at this stage (invocation of disconnect()) causes my
program to hang! Since this is a free and no longer supported library,
I fear that it is not I that am doing anything wrong but thessh
library. Does anybody recognize this behavior? If so I would
appreciate a proposed solution. On the other hand I would even more
appreciate a recommendation for another (MORE STABLE)ssh/sftp library!

Hi I'm usng this powerfull opensource library it's seem is working
very well pls letmi know if is the same 4 u

This is the right link
================
http://www.ganymed.ethz.ch/ssh2/FAQ.html
================

Pls let me know mail to me directly if you wish after I would compare
my experiance wwith some handlyng contro problem ...

But it is working very well

Bye Best regards Paul
(e-mail address removed)
 

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
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top