Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 16, 2021 10:48 pm GMT

Remotely access your Linux servers GUI from your local network

In this post, Ill describe how to enable remote connections to ones Linux servers GUI from other clients on the local network (LAN). If you were instead looking for a way to connect from outside your own LAN, it will most likely involve using some paid VPN service but this post should be useful to you even in that scenario, since youll need to first enable remote access on the server for everything else to work.

Which distro?
I am using a recently acquired desktop that I turned into an RHEL server, particularly version 8.5. It goes without saying that this is quite possible with any other Linux distribution, the only difference is the package managers used and location of sharing preferences used to enable desktop sharing. In my experience, I found this same process easiest on Ubuntu.

What will you get at the end?
Ability to work on your servers desktop from another client just like you would be if you were physically present in front of that server. One possible turnoff would be scaling the resulting image you receive from the server: elongated, too tiny, tiny letters and this usually happens due to difference in resolution between the two devices graphics.

For starters:
RHEL 8.5 already comes with the Sharing Preferences dialog (found in Settings) a Remote Viewer (of varied usefulness) and without a need to install vnc server(s).

Its not as easy as many tutorials describe
Official Red Hat guide describes the whole process very casually: open a menu, switch few things to on and youre done. For one, if you have a combination of Wi-Fi and Ethernet adapters on your server, the dialog that makes it all happen will make available only the Wi-Fi connections. This might throw you off if you have all your clients connecting to the server via an Ethernet LAN. And you may think this is why remote desktop connections dont work. Disregard this and just switch to on at the rolling menu of available networks. Remote desktop access will work even if you turn your clients Wi-Fi off.
And then, its the importance of turning encryption off on the server. Again, a casual mention in the official guide: open the terminal and use a gnome edit command to turn encryption off for remote desktops connections. That wont help. Youll need dconf-editor installed and then dig through its menus.

Finally, the steps:
In the Settings menu, open Screen Sharing, turn the slider to on, set up some simple password for the connection, in the list of available networks choose whatever network has a slider by its side and turn that slider to on.
Assume the root powers on your terminal and open the port for remote VNC connections: port 5901
firewall-cmd -add-port=5901/tcp -permanent
firewall-cmd -reload

Also add your Ethernet NIC that connects your server to your LAN to your current firewall zone:
firewall-cmd -add-interface=enp5s0 -permanent
firewall-cmd -reload

Notice how were not setting zones to which were setting the interface and port as trusted: Im assuming you already set your servers firewall zone to home- the zone in which all devices on your LAN are trusted.
Lastly, install dconf-editor on the server and then open it, go through org -> desktop->gnome->remote-connections and turn the switch to off.
No need to reset any service nor your server: connections from your clients requesting access to your servers desktop should work.


Original Link: https://dev.to/gjorgivarelov/remotely-access-your-linux-servers-gui-from-your-local-network-4ao2

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To