Ubuntu has two types of Remote Desktop: XDMCP and VNC. The difference between the two is that XDMCP is a new session, after logging out, this session is closed. VNC is used to run the current session. After exiting, the original session continues. It is more suitable to run a program with a graphical interface for a long time on a machine, and you need to log on to it through a graphical interface in the middle, for example, I have been running an email graphics client on the machine in the office. I want to check it out when I go home.
Ubuntu has two types of Remote Desktop: XDMCP and VNC. The difference between the two is that XDMCP is a new session, after logging out, this session is closed.
VNC is used to run the current session. After exiting, the original session continues. It is more suitable to run a program with a graphical interface for a long time on a machine, and you need to log on to it through a graphical interface in the middle, for example, I have been running an email graphics client on the machine in the office. I want to go back home and see what new emails are there.
The default vnc protocol is TCP 5900. text transmission does not have any confidentiality. We can combine SSH and VNC to improve the confidentiality of VNC. The following assumes that Ubuntu is run on both the remote end and local end.
Remote:
First, open the vnc server. The default installation of Ubuntu is vino-server, system-> preferences-> remote desktop. When you hook Allow other users to view your desktop, the vino server is opened immediately, remove the hook for ask for confirmation. If you want to, you can also set password protection.
Up to now, you can access the remote end through the local xvncviwer without any confidentiality.
Apt-get install openssh-server, install the ssh server, and access the remote end through ssh locally to test whether the installation is successful.
Ssh remote-server-l user
To disable port 5900 through the firewall, you must open the ssh port. The default value is tcp 22.
By now, the remote end has been set up, and the remote end cannot be accessed through xvncviewer.
Local:
Xvncviewer is installed by default. If not, install xvncviewer.
Open two windows,
Run in the first window
Ssh-L 5900: localhost: 5900 user @ remote-server
If you can log on, run in the second window
Xvncviewer localhost