Author: Nabeel AhmedLast Updated: Tue, Mar 1, 2022
VNC (Virtual Networking Computing) is a system to access computing systems remotely by sharing graphical desktop environments.
Deploy a new Rocky Linux 8 Vultr cloud server.
Set up a non-root user with sudo privileges.
Verify that your server is up to date.
$ sudo yum groupinstall "Gnome"
$ sudo yum install tigervnc-server
If you want to set up a restricted session for a user, type "y" during the view-only password option. Clients who authenticate with the view-only password will have restricted mouse and keyboard access.
Setup VNC user password.
$ sudo nano /etc/tigervnc/vncserver.users
At the bottom of the file, add a new VNC user. Replace
user with your VNC user.
Copy VNC server service boilerplate.
$ sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
Allow the server to run at startup.
$ sudo systemctl enable vncserver@:1
Start the VNC server.
$ sudo systemctl start vncserver@:1
Verify VNC server is running.
$ sudo systemctl status vncserver@:1 Active: active (running)
Initiate SSH tunneled connection on the client machine.
$ ssh -L 5901:localhost:5901 10.32.31.128 -4
Use the flag
-4if your server only has an ipv4 address.
Using a VNC viewer of your choice, enter the following server address:
After entering VNC authentication credentials, you should be presented with a Gnome desktop environment.
VNC server configurations can be set through the
If it doesn't already exist, create and edit the
$ nano ~/.vnc/config
Arguments are line-separated and use an equal sign for values. Here's a sample config file:
Restart the VNC server to apply changes.
$ sudo systemctl restart vncserver@:1
You should have a working secure VNC connection to your Rocky Linux Cloud Server. For more info, refer to the official TigerVNC website for documentation.