Pinterest Stumbleupon Whatsapp
Advertisement

Set up a Linux server? Perhaps it’s running a videogame, or you’ve configured it as the solution to network storage. Or maybe you have a Linux media center, retro gaming machine, or a simple secondary PC.

Whatever the case, at some stage there is going to be a time when you need to access the Linux PC or server (we’ll refer to it as a “box” from this point) from the comfort of your Windows PC or laptop. So, what is the solution?

Windows users have a number of tools available that can be used to enable them to remote control a Linux device. Want to know more? Read on!

You’ll Need the Linux Device’s IP Address

Before you get started, you’ll need to know what the IP address of your Linux device is. The simplest way to check this is to login to you your Linux device, open the terminal, and enter the following command:

ifconfig

The IP address that you’ll need to connect to will be displayed. If the Linux box has an Ethernet connection, the address will be listed alongside eth0. If it’s connected wirelessly, look for the IP address listed against wlan0.

Advertisement

If this isn’t easy, or convenient, there is another method which is almost as simple. In your browser window, connect to your router. This is usually an address like 192.168.0.1 or 192.168.0.100… you’ll find out by looking at the router itself, or the documentation that came with it.

Once signed into the router, look for a link called “Connected Devices” or similar, and use this to find your Linux device by name. You’ll find the IP address alongside.

Keep a note of the IP address, as you’ll need it later. And make sure you know the username and password for your Linux computer or server!

Access Your Linux Box via SSH

SSH is a great way to gain remote access to your Linux device. Although not natively available in Windows, the PuTTY application can be easily downloaded. PuTTY doesn’t get installed — instead, you simply run the downloaded EXE file. For convenience, it’s a good idea to create desktop shortcut How to Create Windows Desktop Shortcuts the Easy Way How to Create Windows Desktop Shortcuts the Easy Way Smart desktop shortcuts can save you mindless sifting through menus and folders. We show you quick & easy ways to create them. Read More .

To use PuTTY for SSH, run the app and ensure Session is selected. In Host Name, provide the Linux computer’s network name, or enter the IP address. Select SSH, then Open. You’ll be typically prompted to accept the certificate for the connection; all that is left to do is use the usual username and password to sign into your Linux device, and you’ll have command line access.

Benefits of SSH: using this method lets you make quick changes to Linux without getting your hands dirty. Particularly suited to software installation and admin changes. It’s also useful for setting up the next option, VNC!  SSH is also perfect for servers How to Remotely Manage a Linux Server with SSH How to Remotely Manage a Linux Server with SSH SSH is very functional, which is why it's a go-to for remote server management. Learn how to remotely manage a Linux server via SSH, from connection, to installing software, and file transfers. Read More without a desktop environment installed.

Setup a Remote Connection with VNC

While you can use SSH, a Virtual Network Connection (VNC) affords access to your remote Linux box’s desktop. But to get started, you’ll need to install some VNC software. On the Linux box, a VNC server application will be required; on Windows, a client.

One of the most popular options for connecting to Linux over VNC is TightVNC. You’ll find the Windows client software at the website, but make sure you choose the right version — it’s available in 32-bit and 64-bit What Is the Difference Between 32-bit & 64-bit Windows? What Is the Difference Between 32-bit & 64-bit Windows? Do you know whether your computer is 32-bit or 64-bit and does it even matter? Yes it does! Let's take a look at where these terms come from and what they mean for you. Read More downloads.

Once you’ve done that, install the tightvncserver on your Linux box. This might be via SSH, or physical access to the computer.

After checking for updates:

sudo apt-get update

…run this command:

sudo apt-get install tightvncserver

Once installed, run tightvncserver, and set a password.

sudo tightvncserver

There is an eight-character limit for passwords. With tightvncserver now running, you’ll see a notification informing you of the port number.

Make a note of this, then run the TightVNC Viewer app in Windows, and input the IP address and required port number. Follow this with the password, and click Connect. The remote desktop will then open, and you can start using the app of your choice. Well, within reason… certain applications with heavy graphical demands are unlikely to run reliably.

Benefits of VNC: offering fast access to the remote PC, TightVNC has its limits. While you can perform standard computing tasks, gaming and video streaming are severely limited. If watching videos is required, you’ll need RDP…

Control Your Linux Box via RDP

The final option is RDP, Remote Desktop Protocol, which is built into Windows. This time, you don’t need to install anything on your PC!

However, you’ll need to add the xrdp software to your Linux box. Once again, this is most efficiently done via SSH with a single command:

sudo apt-get install xrdp

Wait for this to install, then run RDP on your Windows machine. In Windows 8 and later, the Remote Desktop software can be found via Search, simply by inputting the three letters, rdp. With the Remote Desktop Connection window open, input the IP address and hit Connect. If you have advanced connection requirements, click Show Options and input them as required before attempting to connect.

Benefits of RDP: while it might take a bit longer to set up, using RDP at least provides more reliability for media streaming. Of course, if you were desperate to watch video saved on a server, you could simply install a media server application 7 Best Media Server Software Options for Linux 7 Best Media Server Software Options for Linux Want to set up a Linux media server? Where should you start? Plex is a good option, but there are strong alternatives, all of which we've checked to help you make the right choice. Read More for streaming to devices around your house.

Three Ways to Remote Control Linux!

With three options to remotely connect to your Linux box, it should be simple choosing whether to use SSH, VNC, or RDP. Remember, SSH is worth setting up regardless, as it makes installing the other two options far easier!

And don’t worry about remote connecting to the Raspberry Pi, either; all three of these methods work How to Run a Remote Desktop on Raspberry Pi with VNC How to Run a Remote Desktop on Raspberry Pi with VNC What if you need access to the Raspberry Pi desktop from your PC or laptop, without having to plug in a keyboard, mouse and monitor? This is where VNC comes in. Read More with that tiny computer!

Have you ever needed to remote connect to your Linux box? Did these solutions work, or did you run into problems? Let us know — use the comments box below.

Image Credit: Amazingmikael via Shutterstock.com

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. John Smith
    May 30, 2017 at 2:03 am

    Do NOT, I repeat do NOT install and allow VNC (tightvnc, or others) on your Linux box without securing it through reverse tunnel, or port forwarding. You will regret it.
    Have it listen on your local loopback, forward your ports or allow reverse tunnel to your box.
    There are many tutorials for that you can find.

  2. Doradolynne
    March 23, 2011 at 3:31 pm

    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.

  3. Doradolynne
    March 23, 2011 at 4:31 pm

    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.

  4. Desmond
    January 12, 2011 at 11:05 am

    thanks for the article Dave, just what I needed.

  5. K3lvinmitnick
    January 11, 2011 at 12:51 pm

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

  6. K3lvinmitnick
    January 11, 2011 at 11:51 am

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

  7. Linux Commands
    January 11, 2011 at 5:29 am

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

  8. Aram Iskenderian
    January 10, 2011 at 7:43 pm

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

  9. Aram Iskenderian
    January 10, 2011 at 6:43 pm

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

    • Dave Drager
      January 10, 2011 at 8:33 pm

      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
        January 21, 2011 at 4:05 am

        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.

  10. SEO company
    January 10, 2011 at 6:17 pm

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