One of the problems that Windows VNC client cannot access Linux server

Source: Internet
Author: User

For a variety of online messy solutions, I summed up the steps:

1) Yum Installation

Yum-y Install VNC *vnc-server*

2) Modify the Vncserver master configuration file

This file will appear #vim/etc/sysconfig/vncservers//after installation

Copy the last two lines and remove the line header comment, and then change to

vncservers= "2:xxx"//Because the Linux system comes with Telnet, so can not write 1, other casual;

XXX represents your remote user, such as root

vncserverargs[2]= "-geometry 1024x768"//Set the resolution of your server-side interface here

3) Set Vncserver remote connection password

#vncpasswd//Note here to set the password for the remote user, as below, what user you are using to set the password

"[Email protected] Home" #lsjidongjun "[email protected] home" #su Jidongjun "[email protected] home" $vncpasswd

Enter the same password two times

4) Start Vncserver service

#/etc/init.d/vncserver start

5) The previous step is completed in the root host directory. The hidden directory at the beginning of VNC, the directory under which the file is the root user's VNC desktop configuration file. Open Xstartup Configure desktop

#vim/root/.vnc/xstartup

Change the last line to

Gnome-session &

6 finally is the firewall problem, want to let others can log in, you have to open the port of VNC let others come in, many people think that the configuration of iptables, but still can not, then we will be quiet to see if you and my iptables rule corresponds.

==================== First Look at the VNC port =========================

[[email protected] ~]# netstat -nltup|grep vnctcp         0      0 0.0.0.0:6002                 0.0.0.0:*                    LISTEN       8433/Xvnc           tcp         0      0 0.0.0.0:5902                 0.0.0.0:*                    LISTEN       8343/Xvnc           tcp         0      0 0.0.0.0:5802                 0.0.0.0:*                    LISTEN       8433/xvnc

Port to see, then let's have fun adding rules

[[Email protected] ~] #iptables-I input-p TCP--dport 5802-j ACCEPT [[email protected] ~] #iptables-I input-p TCP--DPO RT 5902-j Accept [[email protected] ~] #iptables-I input-p TCP--dport 6002-j Accept

In the face of a large number of online-a, in fact, is also possible, but the premise is that your previous firewall did not make the rules, so I suggest you all use-I.

-I writes the rules from the top down, not ignoring the latest rules because of your previous rules.



I am the chicken move June, I speak for oneself 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0084.gif "alt=" J_0084.gif "/>












This article is from the "Chicken Move June" blog, please be sure to keep this source http://ntxjxp.blog.51cto.com/11279216/1767990

One of the problems that Windows VNC client cannot access Linux server

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.