ubuntu configuration VNC remote connection server graphical interface

In a brief introduction, VNC (Virtual Network Computing) service is an excellent screen sharing and remote connection service, based on the RFB protocol and using the C/S architecture. This service guarantees you to connect to the graphical interface.

First, we need to build a VNC server:

1. Install xfce and TightVNC

sudo apt install xfce4 xfce4-goodies tightvncserver

Among them, this xfce4 is a service for windows remotely connecting to the ubuntu system. When it is running, it will open port 3389 by default for clients to connect. (For windows remote mstsc to open, you need to turn off the firewall.)

2. After the installation is complete, enter vncserver and set the login password for the current user.

3. After entering the password, kill the existing vnc process, back up and modify the configuration file.

Overwrite the following into the configuration file:

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

4. Restart vncserver and check the current port number. Here the default port of vnc is 5900, and for each connection, the vnc port number is +1;

Download nmap service      apt-get install nmap

At this point, the vnc server is complete. Of course, if there is a firewall, remember to open the port or close the firewall directly.

ufw open port 5901: ufw allow 5901/tcp 

Turn off the firewall: service ufw stop or service iptables stop

Update firewall: ufw reload 

Guess you like

Origin blog.csdn.net/qq_41587243/article/details/96441419