Signup/Sign In
FEBRUARY 10, 2023

Easily remote desktop to Linux VPS with RDP/VNC

Technology #linux#howto

    Cloud Computing services like AWS, Digital Ocean, Azure, Linode, etc. provides us a secure way to access the remote machine with SSH. It enables you to open a shell or a command line interface and run commands. Which is great to do every posible thing with CLI, access files, forward ports, etc. Often, you want to access the GUI to perform certain tasks.

    In this tutorial, we will start with a basic command line interface or shell to setup a remote desktop environment.

    If there is a firewall running on your system which does not allows public connection to ports. Please disable it temporarily while following through this tutorial and enable again after finishing this process.

    Update packages

    Firstly, we need to update and fix broken packages by using the following command:

    $ sudo apt update -y && sudo apt --fix-broken install -y

    Setup a desktop environment

    A desktop environment is required to use/access Graphical User Interface (GUI). There are many desktop environment such as Gnome, XFCE4, KDE, etc. We recommend a light desktop environment, XFCE4.

    Install xubuntu-desktop or xfce4-desktop:

    $ sudo apt install xubuntu-desktop
    

    Install Remote Desktop Protocol (xrdp)

    RDP is a remote desktop method and its client comes pre-installed by default in Windows operating systems. We need to install RDP server in the Linux server with this command:

    $ sudo apt install xrdp -y

    Edit XRDP configuration script:

    sudo nano /etc/xrdp/start-ws.sh
    # remove last two lines and add:
    startxfce4

    Make sure that xrdp and xrdp-sessman services are running:

    $ sudo systemctl start xrdp && sudo systemctl start xrdp-sessman

    Conclusion

    In this tutorial, we have used a SSH connection access to newly deployed VPS server. Then we install GUI (desktop environment) and Remote Desktop into it with xrdp server.

    Pradeep has expertise in Linux, Go, Nginx, Apache, CyberSecurity, AppSec and various other technical areas. He has contributed to numerous publications and websites, providing his readers with insightful and informative content.
    IF YOU LIKE IT, THEN SHARE IT
    Advertisement

    RELATED POSTS