1. Introduction to VNC
In the open-source field, remote control technology is represented by VNC. VNC (Virtual Network Computer) is a set of software developed by AT&T lab that can control remote computers. The VNC software can be divided into two parts: VNC Server and VNC viewer. The former is installed on the controlled terminal, and the latter is installed on the master terminal. VNC software is not only open-source, but also cross-platform. For this reason, many system administrators may use Microsoft's operating system and prefer to use this VNC as a tool to remotely manage Linux servers or clients.
The workflow for running VNC is as follows:
(1) connect the VNC client to the VNC Server through a browser or VNC Viewer.
(2) The VNC Server sends a dialog window to the client, requiring that you enter the connection password and access the VNC Server display device.
(3) After the client enters the online password, the VNC Server verifies that the client has access permissions.
(4) If the client passes the VNC Server verification, the client requires the VNC Server to display the desktop environment.
(5) The VNC Server uses X Protocol to require X Server to assign control of the display to the VNC Server.
(6) The VNC Server will be sent to the client using the VNC communication protocol in the desktop environment of X Server in the future, and allow the client to control the desktop environment and input device of the VNC Server.
2. Start the VNC Server
The basic principle of Remote Control Using VNC software is that the master node initiates a connection request using the VNC client and establishes remote control after the control end agrees. In this case, the master can remotely control the control end. To remotely control the Linux operating system using the VNC software, you must first start the VNC server software on the Linux operating system. Otherwise, you cannot establish a VNC connection. However, in most Linux operating systems, such as Red Hat Linux systems, VNC servers are usually installed by default. However, it is usually disabled for security reasons. If the system administrator wants to use VNC for remote control, the system administrator needs to start the VNC server on the Linux operating system.
In the Linux operating system command line, the system administrator can enter the vncserver command to start the VNC server. During the startup process, the operating system prompts the system administrator to enter the VNC connection password for security reasons. It is better for the system administrator to enter a complicated password here, such as a combination of English characters and numbers, to increase the difficulty of supplier deciphering. After a VNC connection is established, the master can operate on the control end as you would on your computer. Therefore, this password will be the final barrier to ensure its security. After successful startup:
Start VNC Server
After the password is configured, the Linux operating system returns the VNC connection address. As shown above, the system administrator can use localhost. localdomain to remotely manipulate the Linux operating system. After entering this network address on the VNC client, you can connect to the VNC server. If you need to change the VNC connection password later, you need to use vncpasswd to change it. Note that it is not passwd. This is different from the command for changing the user password. Generally, as long as the network address is displayed normally, the VNC service starts normally.
In addition, to ensure security, it is best to disable the VNC application server on the server after the VNC Server is interrupted. Run the following command to close the command: # vncserver-kill: 1
The last 1 indicates the number of the window that was previously started. The system administrator should develop a habit of shutting down a service immediately after it is started. One more service is an opportunity for multiple hackers to attack. Especially when using the operating system as a server, this habit can greatly improve the security of the server system. In fact, this is not only true for VNC servers, but also for other Telnet services. In general, the Linux operating system does not start services by default. After the system administrator starts them, the system administrator must close them in time.
However, if the enterprise layout is relatively large, such as from the office of the system administrator to the Linux operating system client, it takes half an hour. For ease of management, if the other party's operating system knowledge is used as a common client, then the Linux operating system can automatically start the VNC server at startup. The system administrator can connect to the VNC Server for remote troubleshooting or remote assistance in case of any problems. Due to the strict security requirements of the client, a certain degree of compromise can be made in terms of management convenience. However, if the operating system is used as a server, the system administrator must be cautious when starting the VNC server automatically. If the system administrator determines that the VNC Server is automatically started when the system needs to start up, you can use the ntsysv service to define it. That is, you only need to enter the command ntsysv in the command line state, and then select the vncserver entry (select by space). That is, if the VNC Server is set to start upon startup. Modify the/etc/sysconfig/vncservers configuration file. Find the VNCSERVER = "1: root" entry in this file (as shown in ). By default, the operating system comment out this line. The system administrator only needs to remove the annotator. After this setting, The VNC Server is automatically enabled after the operating system is started next time. In this way, the system administrator can remotely control the Linux operating system and perform software installation, system configuration, remote collaboration, and other operations.
3. Use VNC Viewer for Linux Remote Management
After configuring the VNC Server, you can use VNC Viewer to remotely log on to and manage Linux. This client program is already provided in Linux. You can open the [application] menu and select [VNC Viewer] From the displayed cascade menu.
Use VNC Viewer
The VNC Server logon dialog box shown in Figure 8 is displayed. You need to specify the address of the Server to be logged on:
Enter the VNC Server address
After the address is entered, the VNC Viewer connects to the VNC Server. The Server needs to authenticate the VNC client and enter the previously set password. After the client passes the server-side verification, the remote logon interface 10 is displayed. You can easily access and manage remote Linux on the GUI.