SSH and Port Forwarding

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

Threaded View
I'm running SSHWindows (sshd) on a Win2k server on port 2345.  From a client
I can connect using "ssh -p 2345 Administrator@server" just fine.  I also
have VNC running on this server at port 5900.  I can configure port
forwarding by typing "ssh -p 2345 -L 1234:server:5900 Administrator@server"
and then connect to localhost::1234 on the client to establish a VNC

Now I assumed that the only port needing to be opened on my firewall would
be port 2345 but I'm finding that this doesn't work unless I also open port
5900.  I'm guessing that's because the server is reconnecting to itself
across the Internet using port 5900.  Is that correct?  I was hoping I could
shut off all ports to my server with the exception of port 2345 (SSH) but by
the way port forwarding is implemented, that doesn't appear to be the case?

Re: SSH and Port Forwarding

Hi Mandy,

Mandy wrote:
Quoted text here. Click to load it

I assume your firewall does not distinguish between locally-originated
and "remote" (real internet) traffic.
I guess you cannot connect to localhost::5900 on the server machine, can

And, by the way, did you set the client settings to connect to
*localhost*::1234 ?

Best regards, HTH

Re: SSH and Port Forwarding

ssh -p 2345 -L 1234:localhost:5900 Administrator@server

  Richard Silverman

Re: SSH and Port Forwarding

Quoted text here. Click to load it

This works, thanks!

Site Timeline