Using a VNC Client to Connect to an Ubuntu VNC Server
To connect to an Ubuntu system running a VNC server using a VNC client, follow these streamlined steps focused on the client-side setup and connection process:
First, download and install a compatible VNC client on the device you’ll use to connect to the Ubuntu server. Popular cross-platform options include:
sudo apt install remmina.These clients are widely supported and work well with Ubuntu VNC servers.
You need the IP address of the Ubuntu system running the VNC server to establish a connection. On the Ubuntu server, open a terminal and run:
ip a
Look for the inet value under your active network interface (e.g., eth0 or wlan0). For example, 192.168.1.100 is a common local IP address.
Open your installed VNC client and input the following information in the connection prompt:
192.168.1.100).:1 = 5901, :2 = 5902, etc.). This is critical—VNC uses port 5900 + display number.Example: If the server uses :1, enter 192.168.1.100:5901 in the client.
When you click “Connect,” the VNC client will prompt for a password. This is the password you set up on the Ubuntu server when configuring the VNC server (using the vncpasswd command). Enter the password to proceed.
For public or untrusted networks, encrypt your VNC connection using an SSH tunnel. This prevents unauthorized access to your VNC traffic. Here’s how:
ssh -L 5901:localhost:5901 username@ubuntu_server_ip
Replace username with your Ubuntu server’s username and ubuntu_server_ip with its IP address.localhost:5901. The SSH tunnel will forward your connection securely to the Ubuntu server.By following these steps, you can securely and efficiently connect to an Ubuntu VNC server using a VNC client. Remember to always use strong passwords and consider additional security measures (like SSH tunnels) for sensitive environments.