nx技术采取了新的远程协议,把x桌面的数据经过提取,仅传送一些参数,而且通过ssh来进行数据加密传送,因此相比VNC或直接XDMP具有很快的速度 和较高的安全性能。要点:
1、yum安装的包是nx-3.4.0-3.el5.centos,freenx-0.7.3-3.el5.centos。
配置文件在/etc/nxserver
客户端的key的位置是
/var/lib/nxserver/home/.ssh/client.id_dsa.key
2、如果验证错误,可以重置key:
nxsetup –install –setup-nomachine-key –clean –purge
nxsetup –install –setup-nomachine-key
3. Installing NX / FreeNX on the server
yum install nx freenx
You may also download the RPMS from:
http://mirror.centos.org/centos/5/extras/i386/RPMS/
and the SRPMS from:
http://mirror.centos.org/centos/5/extras/SRPMS/
Copy a minimal configuration file for nxserver :
cd /etc/nxserver ; cp node.conf.sample node.conf
nxsetup –install –setup-nomachine-key
nxserver –start
4、如果是下载rpm包安装nxclient-3.4.0-7.i386.rpm,nxnode- 3.4.0-11.i386.rpm,nxserver-3.4.0-12.i386.rpm,
配置文件在/usr/NX/etc/,
执 行文件在/usr/NX/bin,初始化明令:
nxserver –install –setup-nomachine-key
5. Installing the NoMachine Client
download from http://www.nomachine.com/
Select the connection type, the desktop system you want to use(e.g. Gnome), and the size of the desktop. Also decide if you want to Encrypt all Traffic via SSL. If you use SSL, not only is the traffic encrypted, but it uses only the SSL port you list to make the connection. This means only the SSL port needs to be open to inbound traffic if you are connecting from outside a firewall. Select Next when finished.
In the advanced dialog window under the General Tab, you should see the items you have already entered and a Key… button. You will need to ssh into the server which you are trying to connect and go to the /etc/nxserver/ directory and edit the file client.id_dsa.key (you must be the root user to open this file). Copy all the text (including the BEGIN DSA PRIVATE KEY and END DSA PRIVATE KEY lines. Press the Key… button, delete the text that is in there, and paste the client.id_dsa.key information from the server into the DSA Key text box (shown in yellow below}, then select Save. [attachment:nxclient4.png] [attachment:nxclient5.png]
6. Misc Notes
If you are installing FreeNX on a remote server, you will also need to install a Desktop environment on the machine in order to run the remote session. An easy to do that for Gnome is to run this command :
yum groupinstall 'GNOME Desktop Environment' 'X Window System'
Note: If you are running CentOS 5, yum groupinstall "GNOME Desktop Environment" may complain about a missing libgaim.so.0. This is a known bug. Please see CentOS-5 FAQ for details.
FreeNX expects to make an ssh connection at 127.0.0.1, i.e., at the local host address. If you haven't changed your default sshd_config, the sshd daemon will be available at that IP address.
However, if you have modified the ListenAddress lines in /etc/ssh/sshd_config, this can cause a problem. Make sure that sshd is available at 127.0.0.1. This can be checked with
netstat -an |grep 22
The result should be similar to
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 :::22 0.0.0.0:* LISTEN
(The above assumes that you use the default port 22 for ssh connections.) This output indicates that sshd is listening on all addresses.
If remotely connected, use the screen command. You are about to restart sshd which will disconnect a remote ssh session. (There are other ways to restart the sshd daemon without disconnecting yourself, but screen is one of the easiest ones.).
screen
This should give you a command prompt. Restart sshd.
/etc/init.d/sshd restart
Use netstat -an again to check that it is now listening at 127.0.0.1.
netstat -an
You should now see something like
tcp 192.168.1.20:22 0.0.0.0:* LISTEN
tcp 127.0.0.1:22 0.0.0.0:* LISTEN
FreeNX will now be able to connect.
http://wiki.centos.org/HowTos/FreeNX
Firewall ports
* NX need at least 2 ports: NX port and X11 port
* NX port = 4000 + display number (open port 5000-5200 on firewall)
* X11 port = 6000 + display number (i.e. open port 7000-7200 on firewall)
原创文章,转载请注明: 转载自素食勤俭敬老孝慈
本文链接地址: 用nxserver代替vnc-server实现快速远程桌面管理
文章的脚注信息由WordPress的wp-posturl插件自动生成
Hello there, simply turned into aware of your blog thru Google, and found that it is really informative. I?m gonna watch out for brussels. I will appreciate if you continue this in future. A lot of other folks will be benefited from your writing. Cheers!
[回复]