If you follow the instruction here:
http://wiki.centos.org/HowTos/FreeNX
You will get an error message from NX client:
The nx service is not available or the nx access was disabled
To fix this, connect to your SSH and type:
cat /var/lib/nxserver/home/.ssh/client.id_dsa.key
Copy the text you get and in your NX client, on your login dialog box go to:
Configure… > General Tab > Key
And paste the text there and you will be fine
Hamid Alipour is a partner in Codehead, LLP with his wife, Tess. Hamid speaks 12 markup and programming languages [Yes, 12: PHP, CSS, Ajax, JavaScript, HTML/XHTML, Java, Python, C/C++, ASP, Visual Basic, Scheme and Action Script]; has a penchant for solving the unsolvable; an affinity for clean, hand-written code and is a Zend Certified 
Thank you so much for this.. I was baffled for a little while
Comment
I was baffled too, and still sorta am- because I thought this could do password based authentication negating the use of a key. But whatever, at least its working.
Thanks
Comment
thanx for posting.
Comment
This is really a HELP!!!!
Thanks a million !!
Comment
Thank you so much !!! You are a genius !
Comment
thank you ! you help me .. sigh
thx so alot
Comment
That’s really great..Thanks a lot this is really helpful
Comment
Thank you very much for that suggestion !!!
Comment
In my case was: /usr/NX/share/keys/default.id_dsa.key
and works fine!
thanks!
Comment