How to remote control a Linux system from Windows

Sometimes connecting to your Linux system from your Windows machine is handy. The Linux machine can function as backup storage, server, or just another desktop to link.

-Advertisement-

If you use separate Windows and Linux computers, sometimes you need to connect to Linux system from your Windows machine. The Linux machine can function as backup storage, server, or just another desktop to link.

In this tutorial, we cover how to control your Ubuntu machine from Windows one remotely. There are three methods to connect to your Ubuntu remotely.

  1. Connecting to Ubuntu via SSH.
  2. Connecting to Ubuntu via Remote Desktop Connection.
  3. Connecting to Ubuntu via VNC (Virtual Network Computing).

Before starting our tutorial, you need to make sure that your Ubuntu is up-to-date using the following commands:

sudo apt update
sudo apt upgrade

Know your Ubuntu IP

-Advertisement-

Step 1. First, we need to install the net-tools package.

sudo apt install net-tools

Install net-tools Package
Install net-tools Package

Step 2. To get the IP of the Ubuntu machine, you can use the following command.

-Advertisement-
ifconfig

Ubuntu Machine IP
Ubuntu Machine IP

As you can see in the previous the Ubuntu machine, IP is 192.168.1.7.

Method 1: Connecting To Ubuntu Via SSH

In this method, we will install the ssh package on Ubuntu. Then we use an ssh client on Windows to connect to Ubuntu.

-Advertisement-

Step 1. On your Ubuntu machine, install the ssh package using the ssh command.

sudo apt install ssh

Install ssh Package On Ubuntu
Install ssh Package On Ubuntu

Step 2. Install the nmap package using the following command.

sudo apt install nmap

Install nmap Package On Ubuntu
Install Nmap Package On Ubuntu

Step 3. Check the ssh port is it is opened or not.

nmap localhost

Check If ssh Port Is Opened Or Not
Check If ssh Port Is Opened Or Not

As you can see in the previous screenshot the default port of ssh service which is 22 is open.

Step 4. On the Windows machine, you can use an ssh client such as putty. Download the putty client from here.

Now let’s open the putty client:

Open Putty Application From Windows Machine
Open Putty Application From Windows Machine

The putty interface should look like the below screenshot:

Step 5. Enter your Ubuntu machine IP in the “Host Name” textbox. Also, you can save the IP in the saved sessions section.

Enter Ubuntu Machine IP
Enter Ubuntu Machine IP

Press the Open button to connect to the Ubuntu machine.

Step 6. A security alert appears you can press the Yes button to continue.

Putty Security Alert
Putty Security Alert

Step 7. Next, you can use your Ubuntu username and password then press Enter button.

Enter Your Ubuntu Username And Password
Enter Your Ubuntu Username And Password

Step 8. Now you are logged in to your Ubuntu.

Remotely Logged In To Your Ubuntu Machine Via Putty
Remotely Logged In To Your Ubuntu Machine Via Putty

You can start executing commands in the putty client:

Start Executing Commands
Start Executing Commands

Method 2:  Connecting To Ubuntu Via Remote Desktop Connection

In this method, we are going to install the xrdp package on Ubuntu machine. Next, we shall use the Remote Desktop Connection from the Windows machine to connect to the Ubuntu one.

Step 1. On the Ubuntu machine, install the xrdp package using the following command.

sudo apt install xrdp

Install xrdp Package On Your Ubuntu Machine
Install xrdp Package On Your Ubuntu Machine

Step 2. Start the xrdp service.

sudo systemctl start xrdp

Start xrdp Service
Start xrdp Service

Step 3. Enable the xrdp service to run with system startup.

sudo systemctl enable xrdp

Enable xrdp To Run With System Startup
Enable xrdp To Run With System Startup

Step 4. Check the xrdp service status to ensure that everything is up and running successfully.

sudo systemctl status xrdp

Check The xrdp Service Status
Check The xrdp Service Status

Step 5. From your Windows machine, open the Remote Desktop Connection from the Start menu.

Open Remote Desktop Connection Application Windows
Open Remote Desktop Connection Application Windows

Step 6. Enter your Ubuntu machine IP. Then press the connect button to continue.

Open Remote Desktop Connection Application Windows
Open Remote Desktop Connection Application Windows

Step 7. You should get a warning message, and you can press Yes button to open the connection.

Remote Desktop Warning Message
Remote Desktop Warning Message

Step 8. Next, you can use your Ubuntu username and password.

Enter Your Ubuntu Username And Password In Remote Desktop Application
Enter Your Ubuntu Username And Password In Remote Desktop Application

Step 9. Now you are remotely logged in to your Ubuntu machine, and you can start using the machine.

Remotely Logged In To Your Ubuntu Machine Via Remote Desktop Connection
Remotely Logged In To Your Ubuntu Machine Via Remote Desktop Connection

Method 3: Connecting To Ubuntu Via VNC

VNC is a Virtual Network Computing, and it is a graphical tool that is used to connect and access the Ubuntu remotely. In this method we are going to install a VNC server on the Ubuntu machine, then we shall use a VNC client from the Windows host to connect to Ubuntu.

Step 1. Install the tightvncserver package using the following command.

sudo apt install tightvncserver

Installing tightvncserver package
Installing tightvncserver package

Step 2. Start the tightvncserver service using the following command.

sudo tightvncserver

You are required to enter a password that should be used while connecting in the Windows VNC client.

Open The tightvncserver Application
Open The tightvncserver Application

As you can see in the previous screenshot, you should see a number like this “:1”, this number act as the desktop number. Remember this number because you should use it in the Windows machine.

Step 3. On your Windows machine, download and install any VNC client like the TightVNC viewer. You can download the TightVNC from here.

Step 4. After the installation completes successfully, you can open the TightVNC viewer from the Start menu.

Open tightvnc Viewer
Open TightVNC Viewer

Step 5. Enter the Ubuntu machine IP and the desktop number mentioned previously.

Enter Ubuntu Machine IP In The tightvnc Viewer
Enter Ubuntu Machine IP In The TightVNC Viewer

Step 6. Now press the connect button to open the connection and enter your Ubuntu username and password.

For further details about how to configure the VNC server on Ubuntu check this tutorial, and to configure the VNC on CentOS check this.

-Advertisement-
Hend Adel
Hi! I'm Hend Adel, a freelancer technical geek with successful experience in Database, Linux and many other IT fields. I help to build solutions to suit business needs and creating streamlined processes. I love Linux and I'm here to share my skills via FOSS Linux! Thanks for reading my article.

4 COMMENTS

  1. Method 2 didn’t work for me while trying to connect from Windows 10 to Linux Mint 19.3. I get get a “login failed for display 0” message when I try logging into xRDP.

Leave a Reply to fredria Cancel reply

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,637FansLike
361FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

Top 20 Git Commands with Practical Examples

If you are here reading this post, there is a high probability that you have heard or interacted with Github, and you now want to learn Git. Before we continue with showing you some of the cool Git commands, let's understand the difference between Git and GitHub.

Top 10 New Features in Linux Kernel 5.7

Linus Torvalds has announced the release of Linux Kernel 5.7 after seven weeks of development. The release announcement comes as a piece of exciting news as it brings a host of new features for the hardware manufacturers as well as the developers.

How to install CMake on Ubuntu

CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process.

How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

VIDEO: Linux Lite 4.8 Features and Desktop Tour

Linux Lite eases Windows 7 users transition to Linux much more comfortable by offering simple software like Team Viewer, VLC, Firefox, TimeShift backup utility, and a full Microsoft Office compatible office suite in LibreOffice.

Linux Mint vs. Ubuntu – which is best for you?

The conundrum is that which one among them? The best solution is to try both of them out, and then choose whatever seems to work the best for your needs. But here, we're giving you some distinctions between the both that might make it easier for you to make a choice.

10 Best Screen Capturing Software for Linux

Do you want to make a video tutorial for YouTube or show-off your epic victory royale to your friends? Look no further — as we have compiled the 10 Best Screen Capturing Software for Linux. Whether you need to record your desktop screen or take a simple screenshot, FOSSLinux has got your back.

Installing multiple Linux distros on a USB drive

A bootable Linux USB drive, which also referred to as a Live USB drive, is a drive containing files that enable a computer to boot into a specific Linux distro. It is most commonly used to test-drive various Linux distros before installing on the computer for use as a daily driver.