yum -y install vnc vnc-server Add normal user:
#adduser user1 #sudo su - user1 #vncpasswdIf you want to add root
#vncpasswdEdit your config:
#vi /etc/sysconfig/vncservers VNCSERVERS="1:root 2:user1" VNCSERVERARGS[1]="-geometry 800x600" VNCSERVERARGS[2]="-geometry 800x600"Iptables, add more multiple destination ports if required, example:
iptables -I INPUT -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPTTo restart:
# service vncserver restart # chkconfig vncserver onIf you want to secure more, block those ports and use ssh to do tunneling inside the vnc server. On your Windows, use tightvnc or realvnc. Toubleshooting:
- bad hostname. Make sure you have hostname correctly. If you just install a server, non-DNS, put your hostname after 127.0.0.1, example: 127.0.0.1 hostname
- On your client if it’s refused, do use port. VNC uses 5901 for terminal 1, 5902 for terminal 2, etc. Therefore your connection should be: x.x.x.x:5901 or x.x.x.x:5902