Tunneling to a third host



i am on a windows box using ssh.com's ssh client (will call it client).

my linux box (host) at work does not have a open port to the internet
but another linux box (gateway) on our network does. i can ssh into
this box and then from that terminal ssh into mine. i have a vnc server
running on host

what i want to do is forward port from client through gateway to host
so i can vnc directly from client to host. theport the vnc server is
running on is 5901 and the port i will use on client is 5902.

to add addition problems i have a different username for each box.

using my ssh clients command window in windows, ssh2.exe, i have
tried the following:

ssh2 -L 5902:host_user@host:5901 gateway_user@gateway

this asks me for my gateway username and appears to log me into this.
no pass for host_user is asked for and it appears that no ports have
been forward, atleast not to host. is there anyway of telling in linux
if ports have been forwarded?

if anyone could suggest the correct command to achieve what i want that
would be great

.



Relevant Pages

  • Re: setting up RD without a VPN connection ?
    ... Remote Desktop only needs TCP Port 3389. ... > The PC in Brazil (the host) is connected via radio internet connection. ... The client cannot connect to the host. ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: UDP Client Problem
    ... If library you use don't return you peer host IP/port that mean that you ... On return it doesn't automaticaly has the source ip and port (that what i ... mentioning the client port and ip in my server code but still i am getting ...
    (microsoft.public.win32.programmer.networks)
  • RE: application for an employment
    ... scanned a publicly available host. ... First off, I put "port scan" in quotes, meaning that, in concept, the two ... attempt to create a 1:1 equality between client connects and a port scan. ... Rights are rights. ...
    (Security-Basics)
  • Re: Complicated routing/SSH-FTP tunneling problem
    ... # client$ ssh -L port:host:hostport server ... # Talking to 'port' on client, ... # everything to 'hostport' on host: ...
    (freebsd-questions)
  • Re: ssh to machines behind firewall?
    ... the ssh client is mad because n.n.n.n:8022 and ... I think you can turn off that host checking, or at least tone down the ... consistently use that for the one on the alternate port. ...
    (comp.os.linux.networking)