Thanks, Atsuhiko. I'll try your suggestion and report the result in a few days.
First, I'll set 2000 for the argument of Session#setServerAliveInterval(int milliseconds). But I have a question. Channel object can only detect the error of TCP/IP socket by this ? Or TCP/IP socket can be protected from sudden server's disconnection? Sincerely, (2010/01/05 18:53), Atsuhiko Yamanaka wrote > Hi, > > +-From: matsuda <mats...@i4s.co.jp> ------ > |_Date: Mon, 28 Dec 2009 14:12:33 +0900 __ > | > |I have a trouble using (SSH)Exec problem. > |It is that "channel object" sometimes fails to detect the close signal. > |Can anyone help me? > ... > |According to my experience, it occurs after running some nights or > |more than 1000 times loop. > > It seems that connection has been dropped in the TCP layer, not in > the SSH protocol layer. > How about enabling the keep-alive? > JSch has supported the server-alive functionality as OpenSSH has done. > Invoke the following method before invoking Session#connect() . > > Session#setServerAliveInterval(int milliseconds) > > > Sincerely, > -- > Atsuhiko Yamanaka > JCraft,Inc. > 1-14-20 HONCHO AOBA-KU, > SENDAI, MIYAGI 980-0014 Japan. > Tel +81-22-723-2150 > +1-415-578-3454 > Skype callto://jcraft/ > Twitter: @ymnk > ---------------------------------- Yukimasa Matsuda Quatre-i Science Co., Ltd. e-mail: mats...@i4s.co.jp http://www.i4s.co.jp ---------------------------------- ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users