double forwarding

View: New views
3 Messages — Rating Filter:   Alert me  

double forwarding

by Khill :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Ok, so my situation is as follows. 3 computers

Home - windows machine
WorkA - CentOS machine, with open SSH port to the world, and all ports open to an internal network
WorkB - CentOS machine, with no open ports to the world, and all ports open to an internal network

What I'd like to do is to get access to a VNC server running on WorkB from Home

What I have been doing as a bit of a workaround is to SSH into WorkA from Home using PUTTY with :5901 forwarded, then started a VNC server on WorkA, logged into that from Home, and ssh'd into WorkB from that VNC session with X11 forwarding. This is kind of like having access to a VNC server running on WorkB, but there are some caveats, such as if my co-worker, who does most of her work on WorkA, has to reboot, all of my processes on running on WorkB terminate.

I feel like I should be able to log into WorkA using PUTTY forwarding say, :5906, then from that command line, do something like "ssh -L 5906:localhost:5906 WorkB" but that doesn't seem to work for me. What am I missing?

Re: double forwarding

by Scott Gorlick :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Khill,
if WorkA has to reboot, you will always lose your connection to WorkB.
But, if you have the VNC server running on WorkB, when WorkA disconnects you, the server and anything you had running will continue to run.
So, why don't you start the VNC server on WorkB and connect to workA with the connect string of:
ssh -L <any available port>:<ip of WorkB>:5901 <ip of workA>

this will start a listener on <any available port> of your home PC and forward (unencrypted) to <ip of WorkB>:5901

then you VNC to localhost:<any available port> and hooza whiz bang you're VNCed to screen 01.  Modify your SSH connect string to match whatever screen you need.

If you need encryption between WorkB and WorkA you can use a backwards tunnel between WorkB and WorkA.  There is some more futzing you will have to do with your connect strings if you need the backwards tunnel.
Scott

>>> Khill <hill.kevin@...> 10/26/2007 9:39 AM >>>

Ok, so my situation is as follows. 3 computers

Home - windows machine
WorkA - CentOS machine, with open SSH port to the world, and all ports open
to an internal network
WorkB - CentOS machine, with no open ports to the world, and all ports open
to an internal network

What I'd like to do is to get access to a VNC server running on WorkB from
Home

What I have been doing as a bit of a workaround is to SSH into WorkA from
Home using PUTTY with :5901 forwarded, then started a VNC server on WorkA,
logged into that from Home, and ssh'd into WorkB from that VNC session with
X11 forwarding. This is kind of like having access to a VNC server running
on WorkB, but there are some caveats, such as if my co-worker, who does most
of her work on WorkA, has to reboot, all of my processes on running on WorkB
terminate.

I feel like I should be able to log into WorkA using PUTTY forwarding say,
:5906, then from that command line, do something like "ssh -L
5906:localhost:5906 WorkB" but that doesn't seem to work for me. What am I
missing?
--
View this message in context: http://www.nabble.com/double-forwarding-tf4698452.html#a13430991 
Sent from the SSH (Secure Shell) mailing list archive at Nabble.com.



Re: double forwarding

by Joseph Spenner :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

--- Khill <hill.kevin@...> wrote:

>
> Ok, so my situation is as follows. 3 computers
>
> Home - windows machine
> WorkA - CentOS machine, with open SSH port to the
> world, and all ports open
> to an internal network
> WorkB - CentOS machine, with no open ports to the
> world, and all ports open
> to an internal network
>
> What I'd like to do is to get access to a VNC server
> running on WorkB from Home

You should be able to do this with 1 port forward.
Assuming you're not running a vnc server at home, the
following should work from home:

In PuTTY-
  Connect to WorkA with the following Tunnels:
    Source: 5900
    Destination: WorkB:5900

Then after that tunnel is built, point your vnc viewer
at: localhost, or 127.0.0.1

That should do it.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com