How To Remote Control Linux From Windows

remote tiny   How To Remote Control Linux From WindowsWe’ve covered how to set up a Linux server for various tasks in previous articles. But once it is set up, what is the easiest way to administer that server? Oftentimes it can be tucked away inside a basement or attic, it doesn’t matter where — as long as it has power and network (and is properly cooled). You don’t need a keyboard, monitor mouse or other peripherals; just a power and network cable.

So once you’ve got the server set up (and of course you’ve tested it to make sure it can boot back up from a reboot or power failure), how do you remotely connect to it?


There are 2 main options: GUI (Graphical User Interface) or CLI (Command Line Interface). Also for the sake of this article, I will mention Ubuntu-only, but the same general ideas work on any Linux-based system.

Finding Your Linux System’s IP Address

For either method, you will need to find your computer’s local Internet Protocol (IP) address. If you have a sidebar, it may show up there, or you can open your network manager “Connection Information” and view it there. If you have not done so already, set up a static IP address so that this does not change when you reboot your Linux computer.

find ip   How To Remote Control Linux From Windows

In the example above, the static IP address is 10.0.2.15.

Remote Control via GUI

Ubuntu and most Gnome-based Linux systems use VNC, or Virtual Network Computing protocol, for graphical remote control. To configure this service, which is disabled by default, go to System->Preferences->Remote Desktop. This will bring up the settings panel for Remote Desktop:

ubuntu remote desktop   How To Remote Control Linux From Windows

I’ve configured the correct settings above for remote control on an unattended box. Another important aspect of this is to automatically log you in to the system on a reboot, otherwise the desktop session will not have started and you won’t be able to log in. You do this in System->Administration->Login Screen.

After enabling these two options, are you are good to go. Install a VNC client on a Windows computer (I recommend UltraVNC (it is only necessary to install the client, not the server) for ease of use. Enter the Linux computer’s IP address and hit ‘Connect’ – it will then prompt you for the password. Once you are connected, it will pop up on your screen and you’ll see this message which is shown on the desktop of the remote computer.

ubuntu connected   How To Remote Control Linux From Windows

We’ve previously written about Remote Desktop on Ubuntu specifically how to establish simple remote access between Ubuntu and Windows and how to use the built-in Remote Desktop in Ubuntu, read on there for more detailed information.

Remote Control Via Command Line

The surest way to connect to a Linux box is to use SSH. All modern Linux systems include an SSH-client installed by default and most will also include the openssh server. Check to see you have it installed by issuing the command:

# sudo apt-get install openssh-server

It will either install the server if you don’t have it, or tell you it already is the latest version.

Once this is installed, all you need to do to connect to the computer is use any SSH client to connect to the IP address. A widely used and free one is called Putty. It works on multiple platforms and is free. Mac OS X users can also use the built-in xterm.

Execute Putty, put in your IP address and hit ‘connect’. You will then be prompted for the username and password on the system, enter it and you are in!

ubuntu putty   How To Remote Control Linux From Windows

Which Way Is Best?

This all depends on your end goal. I find the command line to be much more stable and reliable than VNC so I typically will do everything from there, but then again I am comfortable with and grew up with the Terminal. If you are unfamiliar with Terminal commands or are perhaps used to the ease of use of the graphical interface, then VNC still works very well. It gives you an instant look at the desktop just like the computer was sitting in front of you. Do whichever method works best for you, or experiment with both! Just don’t run any commands that interrupt its network connection or you’ll have to make a trip to install a keyboard and monitor – been there and done that!

Let us know how you make out and of course let us know if you have any other preferred method of connecting to Linux from Windows!

Image credit: Shutterstock

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

11 Comments -

SEO company

As more and more people search online to solve their problems, you should capitalize on this huge opportunity before your competitor does. Thank You ;)

Aram Iskenderian

I think you should also include Nomachine NX Free edition.
http://www.nomachine.com/products.php

Dave Drager

Thank you for mentioning NoMachine. It does work well but involves running a separate service – I have always found straight VNC to work better, but I also know other people who really like NoMachine.

Aram Iskenderian

Thanks Dave.
While I agree, NoMachie’s NX Free edition is not that easy to install, but it is also a secure way. Using a direct VNC connection is good when you are on your home LAN, or on a small office LAN, but for a large office, multiple users around, or over the Internet, it is a security problem waiting to happen.
I have Linux servers that I have setup VNC for the for remote control (for the few thins that I need a GUI remote access and not a shell access), and here is what I do to connect to the securely.

On the Windows computer, download and install PuTTY ssh client or find the portable version if you don’t want to install, available from several web sources like portableapps.com.
Make sure that your Linux server has ssh server running and accepting connections.
Configure PuTTY to connect to your Linux computer, save the configuration, but don’t start the connection yet.
In the PuTTY configuration screen, on the left side, under Connections and then SSH, you’ll see the Tunnels section.
Add a new forwarded port, specifying the source port as 5900, and the destination as [Remote Linux IP address]:5900, click back Session on the top of the left side, and then save the session.
Connect and verify that connection is established.
Start VNC client, and then enter 127.0.0.1:5900 or localhost:5900 in the “Server” field and then click OK.
If everything is working with no problems, then you should be prompted for your VNC remote password, and then you can proceed from there.
This is very secure, prevents snooping and even works when you are behind a firewall that blocks non standard ports.

Aram Iskenderian

I think you should also include Nomachine NX Free edition.
http://www.nomachine.com/produ

Linux Commands

Nice notes. Thanks for explaining How To Remote Control Linux From Windows… very useful. Thanks a lot

K3lvinmitnick

is any topic that guide in Windows ?
k3lvinmitnick.tk,

K3lvinmitnick

is any topic that guide in Windows ?
k3lvinmitnick.tk,

Desmond

thanks for the article Dave, just what I needed.

Doradolynne

This is a good way of doing it, but for those that are not quite so technically minded, there is always the option of a turnkey program, such as proxy networks (http://www.proxynetworks.com) or Bomgar, or even logmein.

Doradolynne

This is a good way of doing it, but for those that are not quite so technically minded, there is always the option of a turnkey program, such as proxy networks (http://www.proxynetworks.com) or Bomgar, or even logmein.