Viet H. Phan schrieb:
> Hi,
> 
> I am using JSch to do SFTP with a partner. The partner asks me to connect to 
> their SFTP
> server through SSH tunneling:
>
> [...]
> 
> My opinion is that this is unnecessary because SFTP is SSH-based already
> (but the partner insists on their requirement).

The reason to do this would be that now only the tunnel-server needs to
be directly accessible from the public internet, not the target server.

This allows them better access control, firewalling, etc.

> I don't see JSch supports this. I see WinSCP supports this.
> Do you think this should be supported by JSch?

You can do it with JSch (and I did it, even).

The simple way would be as with the command-line version:

* create one Session to the tunnel server, and use one of its
  setPortForwardingL methods to create a tunnel.
* create a second session connecting to localhost (and the local
  forwarded port).

An advanced way would be using a SSH session as a Proxy, like shown
in http://sourceforge.net/apps/mediawiki/jsch/index.php?title=ProxySSH.


PaĆ­lo

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to