Use ssh to encrypt VNC communication in Ubuntu

Source: Internet
Author: User
Tags password protection ssh port ssh server
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.