How Windows system connects sky-wing cloud host centos5.8 Remote Desktop

Source: Internet
Author: User
Tags file permissions iptables

To remotely control the CentOS operating system of the Sky Wing Cloud host on your own computer, you can generally use the Putty tool or use Vnc,putty to operate only with commands, while VNC can access the graphical interface. For CentOS depth users, it is estimated that the use of graphical interface is very disdain, but for beginners, graphical interface operation can be more effective.

The use of putty is very simple, download after the input sky-wing cloud host IP can be connected, with the account login can realize remote control, this article mainly describes how to use Vncviewer to visit the Cloud host CentOS System graphics interface.

First, install GNOME desktop system

After using the Putty connection, execute the two statements in turn (all of the following execution commands are using putty)

The code is as follows Copy Code

Wget http://www.vpsyou.com/sh/xwindow.sh;

Sh./xwindow.sh;

Second, the installation VNC service side

The CentOS system of the sky Wing Cloud host does not have VNC installed by default, so we have to install it manually, very simply, execute the following statement:

The code is as follows Copy Code

Yum Install VNC Vnc-server

Third, start VNC service

Execute Vncserver

Prompts for a password, which is the password required for remote login, enter the password, return, and then enter a confirmation.

Configure VNC to include users of remote desktops in the configuration file (take root as an example)

Execute vi/etc/sysconfig/vncservers

Then click the Insert key on the keyboard

Then copy the following statement, then click the right button in the Putty window

The code is as follows Copy Code

Vncservers= "1:root"

vncserverargs[1]= "-geometry 800x600″

vncserverargs[2]= "-geometry 1024x768″

Click the ESC key of the keyboard and enter: Wq! and return

V. Configure the Firewall

Execute Vi/etc/sysconfig/iptables

Then click on the Insert key on the keyboard, and then copy the following statement, click on the Putty window to right-click

The code is as follows Copy Code

-A rh-firewall-1-input-m state-state new-m tcp-p tcp–dport 5900:5903-j ACCEPT

Click the ESC key of the keyboard and enter: Wq! and return

Vi. Modifying the Remote Desktop display configuration file

Execute the following statement sequentially

The code is as follows Copy Code

CD ~/.vnc/

VI Xstartup

Then remove the front # number from the following lines

The code is as follows Copy Code

# unset Session_manager

# EXEC/ETC/X11/XINIT/XINITRC

Precede this line with the # sign (note out)

The code is as follows Copy Code

TWM &

And at the end add the following line

The code is as follows Copy Code

Gnome-session &

Click the ESC key of the keyboard and enter: Wq! and return

Vii. Modify/.vnc/xstartup file permissions

The code is as follows Copy Code

Perform chmod 755/root/.vnc/xstartup

(Note: If you do not do this, the use of Vncviewer connection after the successful display of black screen, the mouse into a cross shape, as shown below:)


Using VNC Viewer to connect CentOS Remote Desktop appears black screen

Eight, restart Vncserver and firewalls

Execute sequentially

The code is as follows Copy Code

Service Vncserver Restart

Service Iptables Restart

Nine, set Vncserver automatic

Execute sequentially

The code is as follows Copy Code

Chkconfig Vncserver on

Chkconfig–list Vncserver

Vncserver

X. Install the VNC Viewer on your own machine and connect the sky-wing cloud host VNC server

The VNC server where you fill in your Sky Wing Cloud host IP plus the port number 8900, such as: 127.0.0.1:8900, select encryption.

Click Connect, enter the password set in the third step of this article, successful

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.