Remote Port Forwarding

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello group,

I've been trying the past few days now to set up remote port forwarding.
I've been seeing other people ask this question but never any solutions.  My
scenerio that I am trying to accomplish is as follows:
Home Computer  -  Home FW - Internet  - Work SSH Server <- VNC Viewer

Home Computer opens a plink ssh session to my Work ssh server and
establishes Port forwarding.
    plink -l testuser -R 5900:localhost:5900 ip_of_remote_server

When I open VNC and attempt a connection to the Work SSH Server, the
connection fails.  I try doing verbose mode for the ssh conection and I see
absolutely no traffic.  I've also tried this in a test environment using
putty and plink to two redhat servers and I have yet to get the remote port
forwarding to work.  Local works fine though, but it doesn't work for my
situation since I have a DSL and an unroutable IP on the modem.

Any thoughts or comments would be greatly appreciated.  I apologize too if I
explained my problem badly.  Thanks!


Re: Remote Port Forwarding

I would think that you forgot the -g option on the work ssh server command.
However just looking at plink it does not appear to offer the -g option that
an ssh command line would.  Maybe someone else here knows more since I
haven't used plink much.

On an ssh command line like ssh -l user -g -R 5900:localhost:5900 sshserver
(hope I typed that right)
The -g to allow other hosts to connect to that port otherwise it only binds
to the local loopback adapter.  However that means ANY hosts on the lan can
connect to it so anyone else who finds "vnc listening" has a pipe back to
the controlled PC.  You would have to use something like an access control
list on the SSH server to block traffic to port 5900 from all hosts but the
one you want to view from for safety.

That may not be much help but it might explain why you cannot connect except
from VNC viewer on the SSH server itself instead of from your VNC viewing

Quoted text here. Click to load it

Re: Remote Port Forwarding

Quoted text here. Click to load it

There is no command line option currently -- you'd have to set up a
saved session to get plink to request this from the remote server. (I
think this is only possible with the SSH-2 protocol, and also the server
has to permit it.)

OP: have you looked at the output of "plink -v"?

Site Timeline