Install NoMachine NX Server on CentOS 5

NX is a quick way to remote administrate my Linux servers (speed comparable to RDP or ARD).

The NoMachine NX Free Edition only allow 2 concurrent sessions (enough for administration purpose). If you need more concurrent sessions, you have to use the paid version or FreeNX server.

Software Used


  • CentOS 5.2 i386
  • NoMachine NX Free Edition for Linux 3.2.0-16


  • Windows Vista Business SP1
  • NoMachine NX Client for Windows 3.2.0-13

Install NX Server

  • login as root
  • startx
  • go to
  • Download the NX Free Edition for Linux i386 Client, Node and Server
  • double-click nxclient-3.*.i386.rpm to install the client
  • double-click nxnode-3.*.i386.rpm to install the node
  • double-click nxserver-3.*.i386.rpm to install the server

Install NX Client

  • go to
  • download the NX Client for your OS (under the NX Client Products section)
  • install and start the NX Client
  • in the NX Connection Wizard
  • Session : MySession (this is the name of your configuration file)
  • Host: myserver.mydomain.local (change it to your own server name)
  • Next
  • Choose UNIX and Gnome as the service provider
  • Size of remote desktop : 1024×768 (up to you)
  • check Disable encryption of all traffic (safe if both server and client are on internet network)
  • Done
  • Try connect to the server
  • Note: If you use Active Directory (Winbind) login, input your username as MYDOMAINusername

Change default DSA Key (Optional)

  • By default, the connection between client and server is encrypted through a DSA key. If both the server and client are the NoMachine version, the default key works fine. There is no need to change the default key if both the server and client are on internal network.
  • If the server is on the internet, it is recommended to change the default key. Read the NX Server Administration Guide for instructions.



If client cannot connect due to mis-match DSA key, delete the file %userprofile%.sshknown_hosts


The config files for server and node are:


Other useful commands

nxserver –help
nxnode –help
nxserver –start
nxserver –restart
nxserver –shutdown (stop existing sessions and shutdown)
nxserver –list (list current sessions)
nxserver –history [clear] (list or clear history sessions)

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)