Remote remote desktop (SSH port fowarding)

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Remote remote desktop (SSH port fowarding)

Postby bobthebob1234 » Wed Apr 27, 2011 8:27 pm

Could have sworn I have asked this before but I can't find it

basically I want to remote desktop a computer on a remote network.

Code: Select all
   +----------+ Da Internet +------------+   Network   +------------+
   |    ME!   |-------------|remoteServer|-------------|RemoteScreen|
   +----------+             +------------+             +------------+


I can ssh to all computers so what I want to do is somehow tunnel port 5900 from the remote screen to me, though the remote server

I can only ssh to the remote server from me, and then ssh from the remote server to the remote screen.
The remote server doesn't have a gui desktop or anything so can't remote desktop that then remote desktop onwards :(

I have played around with -D -L and -R but I can't get it to work....

Any ideas?

Thanks
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1373
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby indie » Wed Apr 27, 2011 10:09 pm

Try the following:
Code: Select all
$ ssh -N -L 5900:RemoteScreen:5900 remoteServer


Then connect to localhost:5900
indie
LXF regular
 
Posts: 135
Joined: Thu Dec 06, 2007 12:00 pm

Postby bobthebob1234 » Thu Apr 28, 2011 11:36 am

OMG ITS AMAZING

Thanks

Can I declare my love for you now?
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1373
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby jlturriff » Tue Feb 26, 2013 1:52 am

Indie,
I've been looking for a solution for this as well. I tried the command sequence you supplied above, but I get the message, "bind: Cannot assign requested address" back and ssh hangs. Is this coming from my local machine's IP stack? Could this be a firewall issue? I'm running OpenSuSE 12.2 on both desktop machines; the server between is running FreeBSD.

Leslie
jlturriff
 
Posts: 6
Joined: Sun Mar 09, 2008 1:49 am
Location: Concordia, Missouri, USA

Postby cmcevoy » Thu Feb 28, 2013 8:26 am

I suspect that is normal behaviour, particularly if you have tried to run the command more than once without killing the previous port binding.
SSH probably isn't hung, it just doesn't return until you have finished with it - put & at the end of the command to put it in the background, but probably better to just run vnc from a different terminal thus:
Code: Select all
vncviewer -encodings tight localhost

I prefer to use a different port eg. 5901:RemoteScreen:5900 and then connect to localhost:1 to leave the default free for 'real' local vnc connexions.
cmcevoy
 
Posts: 70
Joined: Wed Nov 30, 2005 4:06 pm
Location: Ripon, UK


Return to Help!

Who is online

Users browsing this forum: Exabot [Bot] and 0 guests