Hi The code I posted earlier is based on the code used by PortWatcher.java (and it is based very closely on that).
Hence I don't understand why this does not work. The ONLY real difference is, that I call accept() on a ServerSocketChannel instead of a ServerSocket. But as I am calling socket() on the result, that should not differ. Any guess? Regards, Steffen -----Ursprüngliche Nachricht----- Von: Atsuhiko Yamanaka [mailto:[email protected]] Gesendet: Mittwoch, 31. März 2010 04:48 An: [email protected] Cc: [email protected] Betreff: Re: [JSch-users] ChannelDirectTCPIP not working as expected Hi, +-From: "Steffen Heil" <[email protected]> -- |_Date: Wed, 31 Mar 2010 00:39:17 +0200 _________ | |Basically I need to forward a locally accepted connection using a jsch |connection. However I cannot use jsch's own port forwarding, as the ssh |connection may only be established, when there is a pending tcp connect |request... ... |Detected SYN for 127.0.0.1:3389 |Connecting to xxxxx:22 |1: Connecting to xxxxx port 22 |1: Connection established |1: Remote version string: SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2 |1: Local version string: SSH-2.0-JSCH-0.1.33 Is session.setPortForwardingL(3389, targetHost, targetPort) enough for your purpose? If you really want to plug your own I/O stream to the remote, could you try http://www.jcraft.com/jsch/examples/StreamForwarding.java with the latest version (for example, 0.1.42)? 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
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ JSch-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jsch-users
