Remote desktop to Linux from Windows

yum -y install vnc vnc-server Add normal user:

#adduser user1
#sudo su - user1
#vncpasswd
If you want to add root
#vncpasswd
Edit 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 ACCEPT
To restart:
# service vncserver restart
# chkconfig vncserver on
If 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:
  1. 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
  2. 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
]]>

Tagged , ,

Leave a Reply