Remote access from windows to linux

Set up a Linux server? Perhaps you’ve configured it as the solution to network storage. Or maybe you have a Linux work PC, media center, or simply keep a secondary PC in another room. Whatever the case, at some point, you’ll need to remotely access the Linux device from a Windows PC or laptop. So, what is the solution?

Windows users have several tools that enable simple remote desktop from Windows to Linux. Want to know how remote desktop from Windows to Linux? Read on!

You’ll Need the Linux Device’s IP Address

Before you can remote into Linux from Windows, you’ll need the device’s IP address. It’s useful for all remote connection options, although in some cases, the hostname (the device’s network name) will do.

The simplest way to check the IP address is to log in to you your Linux device and open the terminal. Enter:

        hostname -I
    

The IP address of the device will be displayed. For more details, you can also use:

        ip address
    

If your Linux system has multiple connections, these will be listed with prefixes. For example, an Ethernet connection will be listed alongside eth0. If it’s connected wirelessly, look for the IP address listed against wlan0.

If this isn’t easy or convenient, there is another method that 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. Check this by looking at the router itself or the documentation that came with it.

Get your Linux device IP address

Once signed in to the router, look for an option that lists connected devices. Browse through the IP addresses to find your Linux device by hostname. Some routers can even display the device’s operating system. You’ll find the IP address listed alongside, which you should note down for later.

How to RDP From Windows to Linux

The first and easiest option is RDP, Remote Desktop Protocol, which is built into Windows.

Before starting, you’ll need to install the xrdp software on your Linux box. You can do this in person or using SSH (see below) with a single command:

        sudo apt install xrdp
    

To RDP to Linux, run the Remote Desktop software on your Windows machine. In Windows 8 and later, you can find it via Search simply by inputting the letters «rdp».

With the Remote Desktop Connection window open:

  • Input the IP address
  • Use Show Options for any advanced connection requirements
  • Click Connect
Use Windows remote desktop app

It’s as simple as that.

Benefits of RDP: while it might take a bit longer to set up, using RDP provides great reliability and remote desktop access to Linux. This makes it an ideal tool for remote working with Linux machines.

If you use plan to use RDP regularly, you can save some time by creating these custom configurations for Windows RDP.

Connect to Linux From Windows With VNC

A Virtual Network Connection (VNC) also affords remote access to your Linux desktop. As with RDP, however, you’ll need to install some dedicated software. On the Linux box, the VNC server software is required; on Windows, a client app.

One of the most popular options for connecting to Linux over VNC is TightVNC. You’ll find the Windows client software on the website, but make sure you choose the right version.

Download: VNC for Windows

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

First, in Linux, check for updates:

        sudo apt update
    

Next, install TightVNC Server:

        sudo apt install tightvncserver
    

Once installed, run tightvncserver, and set a password when prompted.

        sudo tightvncserver
    

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

Once you’ve done that, here’s how to connect to the Linux machine from Windows:

  1. Run the TightVNC Viewer app on Windows
  2. Input the IP address and port number
  3. Click Connect
  4. Input the password you set when prompted
Connect to Linux from Windows over VNC

The remote desktop will then open, and you can start using the app of your choice—within reason. Certain applications with heavy graphical demands are unlikely to run reliably, if at all.

Benefits of VNC: offering fast access to the remote PC, TightVNC has its limits. You can perform standard computing tasks, but media-related activities are severely limited.

Remote Into Linux via SSH

SSH (Secure Shell) is a great way to gain remote access to your Linux device. You’re not limited to Windows with this option, either, as SSH can be used from almost any device. It’s also very secure.

You have two options for SSH on Windows:

  1. SSH in Windows PowerShell
  2. Download the PuTTY SSH tool

Let’s look at both.

Remote Access Linux With SSH in Windows PowerShell

Windows PowerShell is the new command line tool in Windows 10 and 11, replacing the old Command Prompt app. Find it by right-clicking Start to access the Power Menu and selecting Windows PowerShell. To SSH, enter:

        ssh [IP_ADDRESS]
    

So if the Linux device has an IP address of 192.168.13.123, enter:

  • ssh 192.168.13.123
  • When prompted, accept the certificate.
  • Input the username and password.

You now have remote SSH access to Linux.

Connect to Linux Remotely Using SSH in PuTTY

Although not natively available in Windows, you can easily download the PuTTY application. You don’t need to install PuTTY, however. Instead, you simply run the downloaded EXE file.

Download: PuTTY (Free)

For convenience, it’s a good idea to create a desktop shortcut.

To use PuTTY for SSH:

  • Select Session > Host Name
  • Input the Linux computer’s network name, or enter the IP address you noted earlier.
  • Select SSH, then Open.
  • When prompted to accept the certificate for the connection, do so.
  • Enter the username and password to sign in to your Linux device.
Remote connect to Linux from Windows using PuTTY

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 previous option, VNC! SSH is also perfect for servers without a desktop environment installed.

However, if you need a remote connection to the Linux desktop from Windows, try VNC or RDP.

Three Windows Remote Desktop Methods for Connecting to Linux

Whatever your purpose, there is a suitable option to connect to a Linux machine from Windows. These methods work whether the device is a server, desktop PC at work, media center, or even a Raspberry Pi.

So, if you are wondering which of the following tools you can use to get a remote session on a UNIX/Linux system, here they are from easiest to toughest:

  • RDP (Remote Desktop Protocol)
  • VNC (Virtual Network Connection)
  • SSH (Secure Shell)

If your Linux distro happens to be Ubuntu, you already have a built-in VNC-compatible remote desktop tool with which you can easily create a Linux remote desktop server, or Linux RDP, for short.

Безлимитные тарифы интернета с высокой скоростью соединения упростили администрирование компьютеров. Сегодня все чаще помощь пользователям оказывается удаленно. Это удобно, ведь не надо тратить время на поездки и возможность подключиться есть практически круглосуточно.

Сегодня поговорим об удаленном подключении к Ubuntu из ОС Windows. 

Зачем удаленно подключаться из Windows к Ubuntu

Не так важно, где находится удаленный компьютер – в соседней комнате или в другом регионе. Интернет убирает подобные ограничения, главное – чтобы связь оставалась стабильной на все время настройки. Это одинаково относится к машинам, работающим хоть на операционной системе Windows, хоть на Ubuntu. Последние используются, например, для развертывания сервера CS или Minecraft.

Причины, по которым требуется удаленное подключение:

  1. ручной запуск обновлений на компьютере с Ubuntu;
  2. настройка системы без подключения локального монитора, клавиатуры;
  3. работа с машиной, расположенной по другому адресу.

Пользователю доступно три варианта коннекта с компьютеров, работающих на ОС Windows. Выбор зависит от удобства и предпочтений: SSH через приложение PuTTY, встроенная поддержка RDP и виртуальная сеть VNC (понадобится предварительная настройка клиента). В любом случае перед работами понадобится выяснить IP-адрес компьютера, к которому предстоит подключаться.

Комьюнити теперь в Телеграм

Подпишитесь и будьте в курсе последних IT-новостей

Подписаться


Как выяснить IP-адрес компьютера с установленной ОС Ubuntu

Если есть физический доступ к компьютеру с установленной Ubuntu, на нем открывается терминал (комбинация клавиш Ctrl+Alt+T) и вводится команда ifconfig. В отображенном перечне данных имеет значение строка, начинающаяся с inet addr. Если используется подключение через Wi-Fi, то рядом будет его маркер в виде «wlan0». При проводном соединении фраза будет заменена на «eth0». Рядом отображается актуальный IP-адрес машины.

Второй способ заключается в применении функций графического интерфейса. Последовательность действий: найти значок подключения на панели, кликнуть правой кнопкой мышки, выбрать пункт «Сведения о подключении». Там и указан постоянный IP-адрес компьютера. Если доступа к нему нет, то можно выяснить данные через маршрутизатор. В панели управления отображаются активные пользователи вместе с их «контактами».

Подключение к Linux через SSH

Перед подключением на компьютер с Windows устанавливается приложение PuTTY. Это популярный инструмент для организации SSH-соединения, которое предоставит удаленный доступ к командной строке Ubuntu. Важно понимать, что этот режим требует определенного опыта в управлении, ведь здесь нет привычной мыши и «окошек», а все команды передаются в текстовом виде. Отчеты предоставляются в таком же виде.

Putty

По умолчанию возможность коннекта через SSH в Ubuntu отключена. Так что предварительно эту систему требуется настроить. Активация функции выполняется вводом команды sudo apt install openssh-server (в той же консоли, где ранее был взят IP-адрес). Логин и пароль подключения будут те же, что используются при входе в операционную систему.

Из-за неудобства управления в текстовой среде этот вариант востребован для удаленной активации более удобных инструментов. Например, тех же протоколов RDP или VNC. В них также пригодится IP-адрес, поэтому получить минимальные навыки работы в консоли все равно рекомендуется. Это упростит решаемые задачи, если по каким-то причинам не удается соединение в других режимах.

Подключение из Windows через RDP

Способ подключения через службу Remote Desktop Protocol (RDP) распространен при работе с машинами на платформе Windows. Популярность инструмента объясняется просто – его поддержка встроена во все виды и версии операционных систем. Все, что понадобится для подключения, уже известно: это IP-адрес, логин и пароль от Ubuntu. Запускается утилита через поиск, называется она «Подключение к рабочему столу».

RDP

На компьютере-клиенте требуется установка приложения xrdp.

  1. Необходимо открыть окно термина нажатием комбинации клавиш Ctrl+Alt+T.
  2. Ввести текстовую команду sudo apt install xrdp и нажать «Ввод».
  3. Провести активацию программы командой sudo systemctl enable xrdp.

После установки надо ввести на компьютере-сервере данные доступа и нажать кнопку «Подключить». Если поставить галочку «Разрешить мне сохранять учетные данные», последующие входы будут выполняться без дополнительных вопросов. Но в первый раз пароль всегда вводится вручную. При желании создается отдельный конфигурационный файл (востребовано, когда много компьютеров с удаленным управлением).

После подключения пользователь видит рабочий стол компьютера на Ubuntu. Работа с его окнами не отличается от локального управления – функционируют все настроенные горячие клавиши, перетаскивание мышью. В некоторых версиях Ubuntu, например, 18.04 LTS, RDP не работает, пока не выйдешь из текущего пользователя. Подобные фишки обычно известны системным администраторам.

Подключение через VNC

Есть другой вариант удаленного рабочего стола – сеть Virtual Network Computing (VNC). Она тоже требует предварительной настройки обеих машин. Так, на компьютер с Ubuntu инсталлируется ПО, открывающее доступ к управлению.

Последовательность действий:

  1. Открыть окно терминала.
  2. Ввести команду sudo apt update.
  3. Установить сервер: sudo apt install tightvncserver.
  4. Активировать его: sudo tightvncserver.

Система предложит ввести пароль для подключения. Он понадобится при активации удаленного соединения, поэтому стоит записать (запомнить) внесенные данные.

На этом все! TightVNC Server готов к работе, остается следом настроить компьютер на Windows. Программа доступна на официальном сайте разработчика в двух версиях: 32 и 64-бит.

VNC

После инсталляции и запуска достаточно ввести IP-адрес хоста и пароль доступа, введенный после активации сервера на Ubuntu. Схема работы VNC аналогична предыдущему примеру: пользователь видит перед собой удаленный рабочий стол и управляет функциями операционной системы, как будто сидит за компьютером локально.

How to Connect to Linux Server from Windows Using Remote Desktop Protocol (RDP) can significantly enhance productivity and streamline workflows, especially in environments where both operating systems are in use. This guide will walk you through the steps necessary to establish a remote desktop connection from a Windows computer to a Linux server, ensuring a seamless and efficient remote work experience.

Why Use Remote Desktop?

Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft, which provides a graphical interface to connect to another computer over a network connection. Using RDP to connect to a Linux server from Windows allows you to:

  1. Access a graphical interface: Work with a Linux graphical user interface (GUI) directly from your Windows machine.
  2. Increase productivity: Perform administrative tasks and access applications on the Linux server without needing to switch physical devices.
  3. Simplify management: Easily manage your Linux server using familiar tools and interfaces.

Prerequisites

Before you starts, ensure you have the following:

  1. A Linux server with a GUI installed (e.g., GNOME, KDE).
  2. A user account on the Linux server with administrative privileges.
  3. The IP address or hostname of the Linux servers.
  4. A Windows computer with Remote Desktop Connection installed (available by default on most Windows versions).

1. Install a Remote Desktop Server on Linux

First, you need to install a remote desktop server on your Linux machine. One of the most commonly used servers for this purpose is xrdp, which provides a fully functional RDP server for Linux.

Install xrdp on Ubuntu/Debian
Open a terminal on your Linux server and run the following commands:

sh  Copy code
sudo apt update
sudo apt install xrdp -y

Install xrdp on CentOS/RHEL
For CentOS/RHEL, use the following commands:

sh  Copy code
sudo yum -y install epel-release
sudo yum -y install xrdp

2. Start and Enable xrdp

After installing xrdp, you need to start the service and enable it to start on boot.

sh  Copy code
sudo systemctl start xrdp
sudo systemctl enable xrdp

3. Configure Firewall Rules

Ensure that the firewall allows traffic on the default RDP port (3389). You may need to adjust firewall settings depending on your distribution.

For Ubuntu/Debian with UFW:

sh  Copy code
sudo ufw allow 3389/tcp

For CentOS/RHEL with firewalld:

sh  Copy code
sudo firewall-cmd --permanent --add-port=3389/tcp
sudo firewall-cmd --reload

4. Check xrdp Status

Verify that xrdp is running correctly by checking its status:

sh  Copy code
sudo systemctl status xrdp

You should read a message indicating that the service is active & running.

5. Install a Desktop Environment

If your Linux server does not have a desktop environment installed, you need to install one. For example, to install GNOME on Ubuntu, use the following command:

sh  Copy code
sudo apt install ubuntu-desktop -y

For CentOS/RHEL, you can install GNOME with:

sh  Copy code
sudo yum groupinstall “GNOME Desktop” -y

6. Connect from Windows

Now that your Linux server is set up to accept RDP connections, you can connect to it from your Windows machine.

Open Remote Desktop Connection

  1. Press Win + R to open the Run dialog.
  2. Type mstsc and press Enter to open the Remote Desktop Connection application.

Enter the Linux Server’s IP Address
In the Remote Desktop Connection window, enter the IP address or hostname of your Linux server and click Connect.

Authenticate
A login screen will appear. Enter your Linux server credentials (username and password) to authenticate.

7. Troubleshooting Connection Issues

If you encounter issues connecting to your Linux server, here are some common troubleshooting steps:

  1. Check xrdp service: Ensure the xrdp service is running on the Linux server.
  2. Firewall settings: Verify that the firewall is not blocking port 3389.
  3. SELinux/AppArmor: If SELinux or AppArmor is enabled, ensure they are not restricting xrdp.
  4. Network connectivity: Ensure your Windows machine can reach the Linux server over the network.

Additional Tips

Using Different Desktop Environments

If you prefer a different desktop environment, such as KDE or Xfce, you can install them and configure xrdp to use them. For example, to use Xfce, install it with:

sh Copy code
sudo apt install xfce4 -y

Then, create a .xsession file in your home directory with the following content:

sh Copy code
echo xfce4-session > ~/.xsession

Securing Your RDP Connection

For enhanced security, consider tunneling your RDP connection through SSH. This adds an extra layer of encryption and helps protect your data.

  1. Install OpenSSH server on your Linux machine if it’s not already installed.
  2. Create an SSH tunnel from your Windows machine using an SSH client like PuTTY.

In PuTTY, configure an SSH tunnel as follows:

  • In the “SSH” section, expand “Tunnels”.
  • Set “Source port” to 3389.
  • Set “Destination” to localhost:3389.
  • Click “Add”.

Connect to your Linux server using PuTTY, and then use the RDP client to connect to localhost:3389.

Using RDP Clients for Linux

While Windows comes with an RDP client by default, there are several third-party RDP clients available for Linux that you can use for a more customized experience, such as Remmina or FreeRDP.

Conclusion

How to connect to Linux Server from Windows using Remote Desktop can greatly enhance your productivity and flexibility, allowing you to manage your Linux systems with ease. By following the steps outlined in this guide, you can set up a reliable and secure remote desktop connection, enabling you to access your Linux server’s graphical interface from anywhere. Whether you’re an IT professional, a developer, or a hobbyist, mastering RDP connections between Windows and Linux is a valuable skill that can streamline your workflows and open up new possibilities for remote management.

Table of Content

In this article, we’ll discuss how to remotely access your Linux or Ubuntu desktop GUI from Windows using RDP, making it easier than ever to manage your Linux server from anywhere in the world.

One of the most powerful features of the Linux is its ability to be accessed remotely, allowing you to control and interact with your Linux server or Ubuntu over the internet from outside network.

And when it comes to remote desktop access on a Linux server, xrdp (X Remote Desktop Protocol) is the go-to solution.

With xrdp, you can unlock a world of possibilities, from setting up a headless Linux server to accessing your Linux server’s graphical desktop from any machine, be it a Windows, macOS, or Linux machine.

What is RDP

Remote Desktop Protocol (RDP) is a network protocol developed by Microsoft and is widely used by users to remotely access and interact with the graphical user interface of a remote machine such as Windows Server, Mac, or Linux machine including Linux server.

RDP follows the client-server model, where an RDP client is installed on a local machine, and an RDP server is installed on the remote server or Linux server.

What is xrdp

xrdp is an open-source software package that allows for remote desktop access to Linux-based operating systems, including Linux server.

xrdp stands for “X Remote Desktop Protocol” and is a protocol that enables users to connect to a Linux-based desktop environment from a remote device, such as a Windows, macOS, or another Linux machine.

xrdp uses the Remote Desktop Protocol (RDP) developed by Microsoft.

xrdp is often used as an alternative to other remote desktop solutions, such as Virtual Network Computing (VNC), as it provides a more seamless and integrated experience for connecting to Linux-based systems.

It allows users to access their Linux desktop environment remotely, run applications, edit files, and perform other tasks using a graphical interface, making it convenient for remote administration, support, and other use cases.

Linux server Remote Desktop Access using xrdp

In this blog article, we will delve into the fascinating concept of Linux server remote desktop access using xrdp.

We will guide you through the step-by-step process of setting up xrdp on your Linux server, exploring its features and configuration options, and providing tips and tricks to optimize your remote desktop experience.

So, grab your Linux server, and let’s embark on an exciting journey of unlocking the true potential of remote desktop access with xrdp!

Recommended for you: How to securely remote access Linux Servers using SSH from Windows.

Step 1: Setting up a Desktop environment on Linux server

Before you can remotely connect to your Linux server via xrdp, you need to make sure your Linux server is set up and running.

This includes installing an operating system (such as Ubuntu) and connecting your Linux server to a display, keyboard, and mouse.

Additionally, make sure your Linux server is connected to the internet via an Ethernet cable or Wi-Fi.

For this tutorial we will assume that your Linux server doesn’t have a GUI desktop environment installed. We will install XFCE desktop environment, to have the actual desktop accessible on the Linux server.

Note: If your Linux server already has a desktop environment set up, say Ubuntu Desktop, then you can skip this step and jump to the next step.

sudo apt install -y xfce4 xfce4-goodies 

Next, we will install xrdp to access this GUI desktop environment from a different machine.

Step 2: Install and setup xrdp on Linux server

Following the below instructions to install xrdp on your Linux server:

  1. Open a terminal window.

  2. Update the package list on your system by running the following command:

    sudo apt update
  3. Install xrdp by running the following command:

    sudo apt install xrdp
  4. Once the installation is complete, start the xrdp service by running the following command:

    sudo systemctl start xrdp
  5. Optionally, you can enable the xrdp service to start automatically at boot by running the following command:

    sudo systemctl enable xrdp
  6. It’s important to configure your firewall settings in your Linux server to allow incoming RDP traffic to your Linux server on TCP port 3389 using the following command:

    sudo ufw allow 3389/tcp

Now you can access your Linux server desktop via xrdp from your Windows or Mac PC in a local network. You can jump to Step #4 if you want to access Linux server remote desktop using an RDP client from a local network.

But our goal is to connect to Linux server desktop remotely over the internet.

For this, we’ll use the SocketXP Linux Server Remote Access solution as shown in the next step.

Step 3: Install SocketXP Linux Server Remote Access Agent

We need to install SocketXP Linux Server Remote Access Agent to run in two different places:

  • Linux server — in IoT Master Mode (Default Mode)
  • Laptop or PC — in IoT Slave Mode

Follow the SocketXP download and install instructions to install the SocketXP Remote Access agent on the Linux server and the access devices.

To make SocketXP agent to run in IoT Master Mode (which is the default mode of SocketXP agent) use the below command.

$ socketxp  connect tcp://localhost:3389

Connected to SocketXP Cloud Gateway.
Access the TCP service securely using the SocketXP agent in IoT Slave Mode.

where localhost port 3389 is the RDP server port, on which xrdp is listening for connections from a RDP client such as RDC.

Next, to access the Linux server device from your Windows laptop or PC, install SocketXP Agent for Windows and run the below command:

$ ./socketxp.exe connect tcp://localhost:3000 --iot-slave --peer-device-id "2233-abcdefgh-2342abc" --peer-device-port 3389 --authtoken <auth token>
Listening for TCP connections at:
Local URL -> tcp://localhost:3000  

where 3000 is a local port on your PC at which you want to access the Linux server. You can choose to use any free local port instead of port 3000.

You shall find the device ID of your Linux server device from the SocketXP Portal page in the IoT Devices section. For our illustration, we assume 2233-abcdefgh-2342abc is the device ID of your IoT device.

Step 4: Connect to Linux server remote desktop using RDP Client

With xrdp up and running on your Linux server, you can now connect to it using an RDP client such as Remote Dekstop Connection (RDC) in Windows or Remmina in Linux.

If you are using Linux, use the following command to install Remmina on your Ubuntu Linux based access device such as your laptop:

sudo apt update
sudo apt install remmina

Connecting from Local Network

To access the remote desktop GUI of your Linux server connected to your local network, simply open the Windows Remote Desktop Client(RDC), enter the IP address or hostname of your Linux server, and click “Connect”. Enter your Linux server’s username and password when prompted.

If you are using Linux, you can use the Remmina Remote Desktop Client, which is a popular RDP client for Linux. Open Remmina, click on “New” to create a new connection, select “RDP” as the protocol, and enter your Linux server’s IP address or hostname, username, and password. Click “Connect” to establish the remote desktop connection.

Connecting from Outside Network Over the Internet

If you want to remotely access Linux server desktop from Windows over the internet using SocketXP Linux Server Remote Access solution, then enter localhost or 127.0.0.1 as the IP address and port 3000 on the RDC client.

This is the IP address and port on which SocketXP agent configured to run in iot-slave mode, in Step#3 above, is listening for local proxy connections.

linux server remote desktop access RDP xrdp from anywhere

Once connected, you will be able to see and interact with your Linux server’s desktop environment, just as if you were physically sitting in front of it. You can run applications, edit files, and perform other tasks remotely.

linux server remote desktop access RDP xrdp from windows over the internet

Conclusion:

With xrdp, remote access to your Linux server desktop GUI has never been easier.

SocketXP Linux Server Remote Access Solution is a highly scalable solution that uses secure SSL/TLS tunnel to remotely connect and access Linux server VNC server from a Windows Laptop or a Mac Book.

By following the steps outlined in this article, you can quickly set up xrdp on your Linux server and establish a secure and convenient remote desktop connection from anywhere, anytime.

Whether you’re managing a Linux server remotely or accessing your Linux server for troubleshooting or maintenance purposes, xrdp is a powerful tool that enables you to stay connected to your Linux server with ease.

Happy remote controlling your Linux server!

Recommended Suggestions

Based on your interest, you may also be interested in:

  • How to securely remote access Linux Server using SSH from Windows.

In the previous post, we saw how to use Linux RDP clients to remotely access Windows desktops or apps provided by Terminal Services, a Windows Server technology. But what if you need to provide Linux desktops to be accessed by Windows clients (a kind of “Linux-based Terminal Services”), is it possible?

Yes, it is! Today you are going to see how to achieve that on Linux Kamarada and openSUSE using XRDP.

XRDP is a remote desktop server for Linux based on the Remote Desktop Protocol (RDP), the same protocol used by the Windows app Remote Desktop Connection and the RDP clients for Linux that we saw in the previous post.

Installing XRDP

On the Linux PC or server that will provide desktops for remote access (let’s just call it “server” from now on), install XRDP by running the following commands as root:

1
2
# zypper ref
# zypper in xrdp

Enable the XRDP service, so that it gets automatically started at boot time:

1
# systemctl enable xrdp

You can also start the XRDP service immediately, you don’t need to reboot the server:

Installing VNC

To provide remote access via RDP, a Windows native protocol, XRDP behind the scenes uses VNC, a remote access protocol more common in Linux. Therefore, before using XRDP itself, we need to install VNC, which is an easy task on Linux Kamarada and openSUSE thanks to the YaST Control Center.

Open the YaST Control Center by opening the Activities menu , on the top-left screen corner, typing yast and clicking the corresponding icon:

Within the Network Services category, click the Remote Administration (VNC) item:

On the next screen, check the Allow Remote Administration with Session Management option and click Next:

(actually, I tested both of the first two options and saw no difference at the end)

YaST informs you that it needs to install the vncmanager package. Click Install:

Wait for the installation and configuration process to finish. At the end, click OK:

Configuring the firewall on the server

To finish the installation and configuration of XRDP, just one thing is missing: set up the server firewall to allow the port used by RDP, which is, by default, the port 3389/TCP.

If you use firewalld, which is Linux Kamarada’s default firewall, the RDP protocol is a predefined service named ms-wbt (acronym for Microsoft Windows-Based Terminal). You just need to open it in your network interface zone. Assuming it is the public zone, you can open it with the command (modify as needed):

1
# firewall-cmd --permanent --zone=public --add-service=ms-wbt

Then, reload the firewalld rules:

1
# firewall-cmd --reload

If you use the iptables firewall, to allow the port 3389/TCP, append these lines to your configuration script:

1
2
# RDP (port 3389/TCP)
iptables -A INPUT -p tcp --dport 3389 -j ACCEPT

Note that you just need to set up the firewall on the server. If it was also needed on the client, we would have done it in the previous post.

Logging out from the server

While using Windows’ Remote Desktop Connection, you cannot locally use the server and remotely access it at the same time: if you start a remote access, the server screen becomes locked. The same way, if you log on to the server, remote access is interrupted.

On Linux, XRDP works similarly, with the difference that it does not lock screens nor close connections automatically. Instead, you yourself must do it manually. Before starting a remote access to an XRDP server, you must log out from that server.

To log out from Linux Kamarada, open the system menu, on the top-right screen corner, expand the dropdown menu with your username and click Log Out:

Remote access from a Windows PC

On the Windows PC from which you are going to remotely access the Linux server, open the Start menu, type remote and click Remote Desktop Connection:

Enter the IP address or hostname of the Computer you want to connect to (e.g. 10.0.0.253) and click Connect:

The Remote Desktop Connection app asks if it can trust connecting to the remote computer. Check the Don’t ask me again for connections to this computer option and click Yes:

Then, the Windows RDP client shows the XRDP login screen:

Enter your username and password on the Linux server and click OK.

You will now access your desktop on the Linux server:

(note that the remote access is full screen by default, but you can switch to a window)

When you no longer need the remote desktop, remember to log out from the Linux server.

Tip: saving connection settings for quick access

If you are going to access this Linux server often, you can, for convenience, save the connection settings in some easily accessible place, such as the Desktop.

To do this, on the Remote Desktop Connection main screen, click Show Options. Enter the IP address or hostname of the remote Linux Computer. Also enter your User name on that computer. Optionally, check the option Allow me to save credentials if you want to save your password too. Finally, click Save As:

Choose a folder and a name for the file and save it.

Then click Connect. Let’s make a quick connection just to save the password.

The app asks if you trust connecting to this remote computer. Check the option Don’t ask me again for connections to this computer and click Connect:

If you chose to save your password, enter it on the next dialog box, make sure the Remember me option is checked (it is, by default) and click OK:

You will now actually access the remote desktop. You can just log out.

That’s it! From now on, when you need to remotely access that Linux server, just double-click the file:

Remote access from a Linux PC

If your Linux PC has an RDP client installed, you can remotely access another Linux PC or server running XRDP, that is, a Linux to Linux RDP connection:

For more information on the RDP clients available for Linux, see the previous post:

  • Remote Desktop Connection to Windows from Linux using RDP clients

Conclusion

As we’ve seen, XRDP is a practical way of providing remote access to Linux from Windows, since it’s not necessary to install additional software on Windows, which has a native RDP client.

In a way, it is also a practical way of providing remote access from Linux to Linux. One just needs to install XRDP on the server machine and on the client machines, one of the RDP clients listed in the previous post.

References

  • OpenSUSE Leap 15: Connect to KDE desktop environment via XRDP — Narrow Escape
  • Remote Graphical Sessions with VNC — Reference — openSUSE Leap 15.1
  • Connecting via RDP — Guide — SUSE Linux Enterprise Server for SAP Applications 15 SP1
  • opensuse — Enabling XRDP for remote on SUSE Linux Enterprise Server 12 SP3 (HVM) — Unix & Linux Stack Exchange
  • How To Save Password in A Remote Desktop Connection in Windows 8 — Next of Windows
  • Virtual Desktop Infrastructure by xrdp — openSUSE — YouTube

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Rise of nations для windows 10
  • Как сделать загрузочную флешку ms dos в windows 10
  • Nvidia geforce 930m драйвер windows 8
  • Grub update add windows
  • Сброс пароля администратора windows 10 через восстановление системы