Re: Local tunneling question
Sascha Hunold <[email protected]>
| Newsgroups | gmane.comp.java.sshtools.user |
|---|---|
| Message-ID | <[email protected]> |
Andre Charbonneau wrote:
> // Create a tunnel for the VNC traffic.
> ForwardingClient forwarding = ssh.getForwardingClient();
> forwarding.addLocalForwarding("VNC", "0.0.0.0", 5920,
> "localhost", 5920);
> forwarding.startLocalForwarding("VNC");
> System.out.println("VNC tunnel started.");
>
> // And also open a shell to see what's going on...
> SessionChannelClient session=ssh.openSessionChannel();
> if (!session.requestPseudoTerminal("vt100",80,24,0,0,""))
> System.out.println("Failed to allocate a pseudo terminal");
> if (session.startShell())
> {
> InputStream in=session.getInputStream();
> OutputStream out=session.getOutputStream();
> IOStreamConnector input=new IOStreamConnector(System.in,out);
> IOStreamConnector output=new IOStreamConnector(in,System.out);
> output.getState().waitForState(IOStreamConnectorState.CLOSED);
> }
>
>
> My tightvnc server is listening on a.b.c:5920.
>
I think you will need remote forwarding as well.
The problem is then that 5920 is not free on the remote side. So, I
think you will have to change the send port of tightvnc (if it is 5920).
And that's just my guess (I have successfully done tunneling with
SSHTools but it was years ago).
It is much easier to use the openssh binaries for testing and to do some
experiments to find the correct port configuration.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/