LinuxMCE Forums
May 25, 2013, 03:45:50 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: 1 [2]
  Print  
Author Topic: Remotely ssh into a machine behind LMCE router  (Read 1241 times)
purps
NEEDS to work for LinuxMCE
***
Posts: 1270


If it ain't broke, tweak it


View Profile
« Reply #15 on: June 22, 2012, 02:07:21 pm »

(22, no?)

Thank you very much, that is very helpful indeed.

I successfully got VNC working over my internal network last night, just need to tie it all together now. Will report back with the exact steps.

Cheers,
Matt.
Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #16 on: June 23, 2012, 06:03:01 pm »

Great! Glad to hear that! Yeah,  22. 23 is telnet.  Grin
Logged

purps
NEEDS to work for LinuxMCE
***
Posts: 1270


If it ain't broke, tweak it


View Profile
« Reply #17 on: July 13, 2012, 06:21:32 pm »

Getting VNC to work internally is very different from getting it working remotely I've discovered. It tells me that my commands aren't utter bollocks at least, but of course it doesn't tell me if the approach is correct.

It is now working remotely after a lot of trial and error, but I am not satisfied this is the best way to do it. I do...

Code:
ssh -p 22 -L 5900:127.0.0.1:5900 <coreUser>@<externalIP>
ssh - p 22 -L 5900:127.0.0.1:5900 <desktopUser>@<internalIPofDesktop>

...and then I can do the VNC thing, which is great don't get me wrong, but....

How do I combine these two steps and ssh straight into my desktop, without having to type in the core password? If this is the best way of doing it, then fine, but how do people without a clever LMCE system do it i.e. with a normal router?

Cheers,
Matt.

EDIT: I didn't do anything to the firewall, which makes sense seeing as this is a tunnel.
Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
buckle
Veteran
***
Posts: 65


View Profile
« Reply #18 on: July 13, 2012, 07:59:48 pm »

You can forward a port (using the LMCE firefall config) to your desktop IP, which I wouldn't do.

Or, you could change your ssh tunnel to use the IP of the desktop machine, instead of the core loopback address

Code:
ssh -p 22 -L 5900:<internalIPofDesktop>:5900 <coreUser>@<externalIP>

This won't ssh straight to your desktop.  It will still ssh to the core.  But, the port forward will be to your desktop.  If you really needed to ssh to the desktop to run some commands, you could just ssh from the core to the desktop (no port forwarding req'd). 
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!