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!
Roedy Green - 04 Jul 2007 03:43 GMT
>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
[quoted text clipped - 6 lines]
>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.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Yaneeve - 04 Jul 2007 17:52 GMT
Thanks!
I was hoping to avoid getting my hands dirty with the lower end
protocols...
medianet24 - 12 Jul 2007 22:46 GMT
> 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
[quoted text clipped - 6 lines]
> 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
medianet24@gmail.com