Windows access liunx server _win server via VNC

Source: Internet
Author: User
Tags port number

Installation steps

One, Windows installation Vnc-viewer

Download the Vnc-viewer installation package, [install package link]http://www.realvnc.com/download/viewer/, and install

Second, install Vnc-server1 under Linux, to see if the installation of Linux Vnc-server

Yum Search Vnc-server (see figure 1)

Rpm-qa|grep VNC (see Figure 2)

Figure 1

Figure 2

2, configure the Linux graphics parameters

When it vncserver is run, the. VNC directory is generated in the current user directory, and the current user is root, and there will be a/root/.vnc/directory, and the results of the run are as follows

Modify the Xstartup file in the. VNC directory, change the graphics display parameters

After the modification, the contents of Xstartup file are as follows

The specific code is as follows

!/bin/sh 
Uncomment the following two lines for normal desktop:unset Session_manager
[-x/etc/vnc/xstartup] && exec/etc/vnc/xstartup
[-R $HOME/. Xresources] && Xrdb $HOME/. Xresources 
xsetroot-solid Grey #vncconfig-iconic & 
xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desk Top "&
TWM & 

Note: gnome-session means to access Linux server via VNC to create desktop

Through the above configuration, you can remotely manage the Linux server via VNC client software, and if the Windows system logs on to the Linux system, you need to add the port number of the IP address (the listener address).

3, set the remote landing to the GNOME desktop configuration

Vim/etc/sysconfig/vncservers

 Modify the last line

 vncservers= "1:root"

Behavior service configuration, only one VNC service is currently configured, using user root to Start

4, view the services have been opened

shellvnc-server -list

Turn off services

shellvncserver -kill :1

注释:1表示用户root

5, add firewall configuration

Vi/etc/sysconfig/iptables

 Note: You can copy the 22-Port line, paste modification, restart the Firewall service
 -A input-m State--state new-m tcp-p TCP--dport 5900 : 5903-j ACCEPT

 5900 port is the default service port for remote control software VNC

6, set the login password

shellvncpasswd

7. View port Status

shell查看端口状态:netstat -lnt | grep 590*

Third, the Windows Client Login Server Appendix Map

Access the server via RealVNC (operating system is CENTOS7)

Open the VNC Viewer under Windows and log on to the server

Click Connect to enter the password

Press the ENTER key to enter the CENTOS7.

When you enter, you will find that no keys are clicked on the mouse, root is locked

At the bottom of the CENTOS7 desktop there will be an Unencrypted connection indication that root is encrypted, and pressing the ENTER key will enter another interface, as follows

Enter the password to unlock the can, the operation to this, basically is the end of

In addition, the CENTOS7 is set with screensavers, and if you do not operate every few minutes, the following interface will appear

You can still re-enter the system by following the above procedure.

That's it,!!!.

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.