[K12OSN] Remote Desktop immage while ssh

Peter Scheie peter at scheie.homedns.org
Sun Sep 16 14:57:12 UTC 2007

Nils Breunese wrote:
> John Lucas wrote:
>> On Saturday 15 September 2007 23:44, ahodson wrote:
>>> Hi Nils
>>>  From my server I need to ssh into 6 other servers - I use
>>> <ssh -l root 10.###.###.### -X>
>>> to gain console access, and then run routines like
>>> /usr/bin/system-config-users
>>> to add new students to a server, etc. The question was directed at
>>> finding out how to turn console into the remote desktop, so I can then
>>> push a chosen desktop background to all users using the "Push new
>>> icons..." desktop icon... Is this doable this way?
>>> Thanks for helping
>>> alan
>>> -=o=-
>> If I have decoded "how to turn console into the remote desktop" 
>> correctly,
>> then you would need NX/freenx and log onto the remote system as root 
>> (where
>> the "Push new icons..." are located). You could *try* something like this
>> (assuming KDE for the moment):
>>     ssh -X -l root remotemachine '/usr/bin/startkde'
>> But I don't think you would like the result. NX is more efficient, you 
>> can
>> suspend sessions etc. NX/freenx would be the right tool.
> That, or VNC if bandwidth isn't much of an issue (VNC is less work to 
> setup). No SSH needed, that's why I was confused. Of course you can also 
> just add users from a regular SSH shell, but I take it you're not very 
> comfortable using the command line? It is much faster than any remote 
> desktop method. :o)
> Nils Breunese.

You can also tunnel VNC over SSH in a two step process.  Step 1, ssh to 
the server like so:

ssh -L 3700:localhost:5900 10.x.x.x

Step 2: Start the vncviewer on your local system (not the server you're 
ssh-ing to) and point it at localhost:3700.  The connection will get 
redirected over the ssh session and you'll get the VNC login screen 
which looks just like what the clients see.   This method gives you ssh 
security so you can use it over the internet, but not the 'must be setup 
beforehand' requirements of NX.  OTOH, the 10.x.x.x address you mention 
suggests you may only be connecting over the LAN, not the internet, so 
the security may not be that important.  If you are connecting over the 
internet, I suggest taking John's advice and setup NX as the performance 
is much better than VNC, especially if this is something you'll be doing 
in an ongoing basis.  But VNC over SSH is great in a pinch.  (I think 
it's at this point that Les points out that some version of VNC comes 
with ssh tunneling built-in, but I can never remember which version, and 
that version isn't always available; this method works with any version.)


More information about the K12OSN mailing list