Remote access in Linux

Monday, 19 March 2007, michuk

If you have ever tried to access a Windows box remotely, it is very likely you suffered a lot of frustration. Remote desktop works great… but only when you have a stable broadband connection to your remote machine. In GNU/Linux you (as usual) have a choice – you can connect remotely, both graphically and text-based (for maximum performance) using at least a few methods described in the article.

As you know, Windows XP works only in a graphical environment. Thus, when we connect to it remotely, we are condemned to use the GUI. This is called “remote desktop” and it works great… but only when you have a stable broadband connection to your remote machine. When you are on a modem (like GPRS, EDGE) or another type of weak connection, using the remote desktop in a comfortable manner is just not possible. In the case of previous versions of Windows, it’s even worse since the RDP connection is not available there and you are forced to use third party tools like TightVNC or shareware radmin, which does not offer comparable performance to the Remote Desktop.

In GNU/Linux you (as usual) have a choice – you can connect remotely, both graphically and text-based using at least a few methods described below.

  • Connect via SSH
    SSH is a secure shell, the secure descendant of telnet protocol. SSH enables you to access a shell of a remote machine in a secure manner (the transmission is encrypted). What can you do with the shell? In short: everything that you can do with the GUI plus a lot more. Check out the article The power of the Linux Console to see the details. Via SSH you can also run remote graphical apps on your local machine, provided that you have an X-server installed locally (this is the default in GNU/Linux and BSD and easily available in MacOSX; for Windows you need to run additional program for that, e.g. the X-server from the free cygwin package or commercial WinaXe). SSH is the most popular and the safest way to work remotely on a Linux box. However, if you need to access your whole desktop remotely, you can use one of the technologies described in the following points.


Skype run over an SSH tunnel

Pic.1 Skype run over an SSH tunnel — a viable solution for
restricted networks with blocked ports

  • Pure XDMCP connection
    This X-server function is disabled by default in most of the Linux distributions due to the low level of security it offers (no transmission encryption). However, run over an SSH tunnel, XDMCP connection can be a good way to access your home desktop from a remote machine. It has to be mentioned that it needs a pretty fast Internet connection to work flawlessly.
  • Desktop Sharing in KDE and GNOME
    K Desktop Environment has an option called “desktop sharing”, which is a client-server solution provided by the kdenetworks package (krdc + krfb). Desktop sharing is realized through the RFB protocol (better known as VNC) and is compatible with any other VNC client. The benefit of KDE Desktop Sharing is the GUI interface for setting it up both on the server and client level. We can use a neat wizard to enable remote access to particular machines and users, set proper passwords, etc.
  • GNOME, on the other hand, provides its own framework for remote connections, called Vino. The solution is also VNC-based. Vino is just another VNC server which is strictly integrated with GNOME. It allows you to access your GNOME desktop remotely in order to work or perform system diagnosis.

    As far as the performance is concerned I haven’t noticed any significant difference between GNOME and KDE desktop sharing.


KDE Desktop sharing

Pic.2 KDE Desktop sharing
— configuring a connection

  • Connect using external tools like FreeNX or VNC
    Using external tools like different VNC programs (RealVNC, TightVNC, Vnc4 and more) or a less popular but much more efficient FreeNX, gives you another possibility to access your machine remotely. Both technologies enable you to log in remotely or access an existing X session (read-only or read-write). These two technologies are platform independent and can be used in any combination between GNU/Linux and MS Windows systems.

So, what do we get gratis when using GNU/Linux? The key thing seems to be the option to access a remote shell in a text-based way and the possibility to run single applications remotely (without having to download the whole environment) thanks to SSH and tunneling. Desktop sharing in Windows and Linux is on a similar level. I could even take the risk of saying that the default Windows Remote Desktop is a superior solution to XDMCP or desktop sharing in GNOME and KDE. When platform-independent technologies are used (VNC, FreeNX or non-free NX client/server) the performance is similar in both environments. It has to be mentioned that the commercial NX package is the best solution when you are short on bandwidth.

Further reading:

Subscribe to RSS feed for this article!

29 Comments

fold this thread RandomDude  Thursday, 22 March 2007 o godz. 1:42 am #  Add karma Subtract karma  +0

Dude you can connect remotely to windows with other programs like FreeSSH.

(Comments wont nest below this level)
 
fold this thread michuk  Thursday, 22 March 2007 o godz. 1:51 am #  Add karma Subtract karma  +0

Dude you can connect remotely to windows with other programs like FreeSSH.

Of course but… what can you do then? You can use only the text tools from cygwin or other toolkit borrowed from… Linux. In pure Windows you can do nothing in the command line, unless you are a real hacker. This is the point. In Linux it’s just way easier and it’s enabled by default. That’s all.

(Comments wont nest below this level)
fold this thread Neg  Monday, 19 May 2008 o godz. 7:05 pm #  Add karma Subtract karma  --1

You can do… *gasp* anything in Windows command line. Learn the environment.

 
 
fold this thread Jordan  Thursday, 22 March 2007 o godz. 9:59 am #  Add karma Subtract karma  +0

You left out setting up your system to answer the phone. Easy access to the command prompt… old school, but still does the trick. Easy how-to (from ’03).

(Comments wont nest below this level)
 
fold this thread kuriharu  Friday, 23 March 2007 o godz. 2:03 am #  Add karma Subtract karma  +0

Using Remote Desktop in Windows only applies to XP Pro. Most PCs are XP Home, so yer screwed.

It does run well, tho’, when you have it. You just can’t transfer files.

(Comments wont nest below this level)
 
fold this thread Jim  Friday, 23 March 2007 o godz. 4:07 am #  Add karma Subtract karma  +0

vmware/server works great for remote access and it is free (not open source)

(Comments wont nest below this level)
 
fold this thread downforce  Friday, 23 March 2007 o godz. 8:11 am #  Add karma Subtract karma  +0

Interesting article, however can’t agree with you 100%.

I would agree remote access (console style) is infinitely better under Linux, but wouldn’t for Remote Desktop functionality. Setting up RDP is a royal pain in the ***, so much fiddling etc etc.

Also issues of Linux to linux and windows to linux or linux to windows present different problems (can’t say about mac’s – don’t know).

For linux to linux I use ssh -X “host”. TBH not sure how secure this is, but tend to do over a LAN and it’s painfully slow.

Windows to Linux I use a great X-Server of windows called Xming (GNU licence) and it works well (once you RTFM anyway!).

Linux to Windows, still leaves you with same problems, I haven’t even looked into RDC for Linux, but again I use the tightvncclient that’s in the Ubuntu repositories.

Also, I’ve had less problems using TightVNC or other VNC packages than Microsoft’s own RDC, it’s so sensitive to dodgey lines.

SSH Tunnelling is such a great way to “break” through corporate firewalls, esp if you change the incoming ssh port to 443, which most corporate proxies allow for HTTPS connections. It does mean sacrificing your HTTPS web capabilities, if you so have it configured.

(Comments wont nest below this level)
 
fold this thread M$  Friday, 23 March 2007 o godz. 1:51 pm #  Add karma Subtract karma  +0

But M$ seems to offer something new called PowerShell. Some people tell that it’s even better that unix / linux shell as enables you to work with objects.

(Comments wont nest below this level)
 
fold this thread JCA  Friday, 23 March 2007 o godz. 1:54 pm #  Add karma Subtract karma  +0

SSH is not the secure ancestor of telnet. Rather, telnet is the insecure ancestor of SSH.

FreeNX is nice, but it has two major shortcomings:

1) Setting it up with NX (to get its real performance benefits) is black magic. It is not clear at all what packages one needs, and how they should be configured.

2) It can’t attach to an already running X session.

(Comments wont nest below this level)
 
fold this thread davidwr  Friday, 23 March 2007 o godz. 10:40 pm #  Add karma Subtract karma  +0

Windows users can use commercial “free for home use” remote-control programs like GoToMyPC. Bonus: They work through most firewalls.

(Comments wont nest below this level)
 
fold this thread Vivek Kapoor  Saturday, 24 March 2007 o godz. 2:42 pm #  Add karma Subtract karma  +0

downforce; you should try -XC instead of just -X. It’ll give you compression and the applications would be pretty fast on a lan connection.

(Comments wont nest below this level)
 
fold this thread Sum Yung Gai  Saturday, 24 March 2007 o godz. 7:34 pm #  Add karma Subtract karma  +1

I use SSH to tunnel X11 sessions all the time. If I’m on a slow bandwidth connection and need a GUI app, I simply throw the -C switch to get compression. Works fine.

spitz@cmosnetworks.com

(Comments wont nest below this level)
 
fold this thread faxe  Monday, 26 March 2007 o godz. 1:37 pm #  Add karma Subtract karma  +0

Hm, MS Windows XP has a telnet server built in.

(Comments wont nest below this level)
 
fold this thread Nicholas Butler  Tuesday, 27 March 2007 o godz. 9:26 am #  Add karma Subtract karma  +0

I was just saying this yesterday to a windows admin guy how much choice and functionality have been built into Linux as part of the operating system. You would think that after 15 years Microsoft would have taken this requirement into account but no we are still stuck with 20 solutions to one problem and no standards. Thanks for prompting me to write it down and blog it later.

Cheers

oh and Faxe ? Telnet to the built in server and you still cannot remote support as effectively as any of the above!

(Comments wont nest below this level)
 
fold this thread david  Tuesday, 27 March 2007 o godz. 10:36 am #  Add karma Subtract karma  +0

This article is actually pretty hilarious.

Sure you have “choice” in *nix, however by default windows RDP and Telnet server combo is far MORE powerful than canned unix remote control services.

Entertainingly, the software rated most highly and the software in widest use is cross platform and always has been.

For once, the “state of linux remoting” is actualy just “worse by default and then just about comparable”. I actually used to RDP to windows servers over a 56k modem and it’d behave perfectly, I’d have to use SSH to get any kind of performance out of linux in the same environment.

(Comments wont nest below this level)
 
fold this thread Simon Hibbs  Tuesday, 27 March 2007 o godz. 12:07 pm #  Add karma Subtract karma  +0

This realy is silly. Windows XP had had remote desktop biuilt in for years, and you can even use a simple support tool built into the help system to invite an admin to monitor or remote controll your PC while you watch. All the stuff mentioned for Linux is also available for XP/Server 2003 as well – Telnet, VNC, even Xwindows. The author even says that VNC doesn’t offer the same functionality as Remopte Desktop (such as session sharing?), admitting that the free built-in tool is superior to the Linux tools!

If this article had been written 4 years ago it would have a point. As it is though, it’s just an embarrasing fanboy troll post dressed up as an article.

(Comments wont nest below this level)
 
fold this thread sp1d3r  Tuesday, 27 March 2007 o godz. 12:13 pm #  Add karma Subtract karma  +0

If what you want is a desktop, much like VNC, and you want to stay secure, you have two basic choices. One starts an entirely new desktop session and is useful for multiple simultaneous users – NX. This is not difficult to setup – Fedora Core 6 has freenx in its repositories for the server and the free client is available for from NoMachine. You just have to remember to grab the client.id_dsa.key file from /etc/nxserver/ on the server and import it into the client. You can perform this whole procedure remotely using SSH, PuTTY and/or WinSCP.

The other secure option, which uses an already established x-session (useful for showing people in the remote location how to do something), is x11VNC (server) and SSVNC (client). The commands needed for the server are as follows:

cd ~
wget http://jaist.dl.sourceforge.net/sourceforge/libvncserver/x11vnc-0.8.4.tar.gz
tar -zxf x11vnc-0.8.4.tar.gz
cd x11vnc-0.8.4
./configure
make
make install
x11vnc -usepw

Which, when run as root, downloads the source to the home folder, untars it, runs the automated configure script, compiles and installs, then starts it (prompting for a password on first use).

The client connects via SSH (usually port 22), then connects to the local VNC session (on port 5900), which is tunneled back out through your SSH port.

Two secure options; easy to setup; new x-session or established x-session – take your pick!

(Comments wont nest below this level)
 
fold this thread krach.aran  Tuesday, 27 March 2007 o godz. 12:42 pm #  Add karma Subtract karma  +0

a) Do not compare apples and pears…. the will always be different… even if they are both fruit.

b) M$ is better than *nix is better than cp/m is better than amigaOS is better than…..(fill in any os) discussions are getting really old really fast

c) I can bias this discussion to any side i want. if i want to run on a 486-dx2 with 8mb ….. use linux and ssh…. don’t even try xp. If i want easy to configure applications for both beginning and advanced users… use windows (no poking around in /etc/myapp.conf files)

i use linux everyday (my web,mail and proxy server)…. but are a .net software engineer (using vs 2k3 and vs2k5 on windows) for a 50k employee software house… )

these discussions drift people apart instead of crossing them over to another side, or even proving a point. no OS is better or worse…. most of the times it’s the writer’s preference that you can read between the lines (or a company backing the research is biased).

i have learned that unix works best in lightweight applications (nas,routers) and large server parks….. BUT THAT IS ME !!!!

Seek your own solution young padwan, yours is out there also !!!!!

(Comments wont nest below this level)
 
fold this thread michuk  Tuesday, 27 March 2007 o godz. 1:02 pm #  Add karma Subtract karma  +0

Simon Hibbs: Hey, I’m not saying Linux is better than Windows in GUI remote access. Where have you read it? The thing is in Linux you just have more choice. I’m not sure where you have seen my fanboyism but please be so kind and point it out. I will surely correct any inaccuracies you’ve found.

(Comments wont nest below this level)
 
fold this thread RandomDude  Friday, 6 April 2007 o godz. 12:35 am #  Add karma Subtract karma  +0

You can use only the text tools from cygwin

pstools, cli tools that come with windows resource kit and there is a lots of tools that don’t come from cygwin.

or other toolkit borrowed from… Linux

Ok dude some tools are borrowed: wget,gcc,bash from GNU… but most not from Linux.

(Comments wont nest below this level)
 
fold this thread Fabnic  Sunday, 9 December 2012 o godz. 10:33 pm #  Add karma Subtract karma  +0

Hey,I liked your website it surely looks fantastic. But what good would it be if no one sees your site? Here at Fabnic, we’re giving out extremely cheap backlinks and social media solutions for just a fraction of the price we charge normally (call it a Christmas offer). Do have a look at our website and I’m sure you wouldn’t like to pass those wonderful offers. Thank you, Mark http://fabnic.com

(Comments wont nest below this level)
 
fold this thread square root  Thursday, 18 April 2013 o godz. 5:25 pm #  Add karma Subtract karma  +0

This is a excellent web site, could you be involved in doing an interview regarding just how you designed it? If so e-mail me!

(Comments wont nest below this level)
 
fold this thread ルイヴィトン 財布  Wednesday, 24 July 2013 o godz. 10:45 pm #  Add karma Subtract karma  +0

I love your blog.. very nice colors & theme. Did you make this website yourself or did you hire someone to do it for you? Plz answer back as I’m looking to create my own blog and would like to know where u got this from. thanks

(Comments wont nest below this level)
 
fold this thread diffamation badog  Wednesday, 18 June 2014 o godz. 12:31 pm #  Add karma Subtract karma  +0

When some one searches for his essential thing, therefore he/she wishes to
be available that in detail, thus that thing is
maintained over here.

(Comments wont nest below this level)
 
fold this thread vidéo sacrément troublante gratuite avec cette vicieuse au zigouigoui velu  Sunday, 22 June 2014 o godz. 7:07 pm #  Add karma Subtract karma  +0

On va dire que ce n’est nullement faux ..

(Comments wont nest below this level)
 
fold this thread Archivage de documents  Monday, 14 July 2014 o godz. 1:33 am #  Add karma Subtract karma  +0

My spouse and I stumbled over here from a different web page and thought I might check things out.
I like what I see so i am just following you. Look forward to going over your web page again.

(Comments wont nest below this level)
 
fold this thread http://www.youtube.com/watch?v=eNlAILvB-mo  Tuesday, 29 July 2014 o godz. 9:04 pm #  Add karma Subtract karma  +0

However, the most comon cause is genetic predisposition and
hormonal imbalance, the main cause of which is often the ovaries.
Usually it is not as juicy as other oranges, but has an intense flavor.
You can visit their website with an intention to purchase quality medical equipment of your choice.

(Comments wont nest below this level)
 
fold this thread document management system open source  Saturday, 9 August 2014 o godz. 10:20 am #  Add karma Subtract karma  +0

Every weekend i used to pay a visit this website, for the reason that i
want enjoyment, since this this site conations actually nice funny information too.

(Comments wont nest below this level)
 
fold this thread rower elektryczny romet  Monday, 29 September 2014 o godz. 8:35 am #  Add karma Subtract karma  +0

Excellent post. I was checking constantly this blog and
I’m impressed! Very useful information particularly the last part :) I care for
such information a lot. I was seeking this certain info for a long time.
Thank you and good luck.

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI

Adjust field size: shrink | enlarge)


You can use simple HTML in your comments. Some examples are as follows:
  • A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
  • Strong text: <strong>Strong text</strong>,
  • Italic text: <em>italic text</em>,
  • Strike: <strike>strike</strike>,
  • Code: <code>printf("hello world");</code>,
  • Block quote: <blockquote>Block quote</blockquote>