Hi,

2013/4/5 Atsuhiko Yamanaka <y...@jcraft.com>

> Hi,
>
>    +-From: Lars Merke <larsme...@gmail.com> --
>    |_Date: Wed, 3 Apr 2013 16:17:15 +0200 ____
>    |
>    |I am using ChannelDirectTCPIP to forward arbitrary data to machines
> behind
>    |my SSH server. Unfortunately the connect method does not provide the
>    |possibility to define a timeout value. In my case my Linux SSH server
> box
>    |has a tcp timeout of about 190 seconds. ChannelDirectTCPIP.connect()
> calls
>    |Channel.sendChannelOpen(), which will retry opening the channel 10
> times
>    |with 5 second wait time and then throws an Exception.
>    ...
>
>    |Is it possible to add timeouts to ChannelDirectTCPIP?
>
> I have added the following method,
>   Session#setPortForwardingL(String boundaddress, int lport, String host,
>                              int rport, ServerSocketFactory ssf,
>                              int connectTimeout)
> Would you please try
>   http://www.jcraft.com/jsch/jsch-0.1.50-rc3.zip  ?
>
>
I tried. Unfortunately it does not work for me. It breaks portforwarding
completely.

I think the problem is ChannelDirectTCPIP not overriding the connect(int)
method from Channel but only connect(). This will make PortWatcher use
Channel#connect(int) instead of the ChannelDirectTCPIP specific connect
method.

Thanks for your effort

Lars
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to