Sunday, October 18, 2009

nxclient setup tricks

NoMachine is a uber cool alternative to VNC or any of the remote access solutions. Whats more, its very secure as it runs on top of ssh and doesnt need any special ports to be managed. You can use your regular ssh access to get into your box and its pretty fast too.
However, there are specific issues when installing the nxserver and nxclient. Ive attempted to mention a few of the problems and possible steps for getting an error free install and happy computing :)
1. Download the nxserver, nxclient and nxnode from here (Assuming the server is on Linux). Install the rpms or deb packages on the Server.
2. Download the nxclient and install it on your client machine.
3. Generate a public-private key combination on the client machine.
raja@binarytech:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/raja/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/raja/.ssh/id_rsa.
Your public key has been saved in /home/raja/.ssh/
The key fingerprint is:
After this, you would have (containing the public key) and id_rsa (containing the private key).
4. Now we need to check how we can use NXClient to connect to the server. Copy the public key (the from earlier step) into ~nx/.ssh/authorized_keys2 on the server machine. The typical directory for ~nx would be /usr/NX/home/nx.
5. Try and connect to the server from the client. This should succeed without asking for passwords
6. Login into the server as the user you want to connect. In this case, I want to login as "raja"
7. Enter your password.
8. You can run any command once you are in the shell. Play with it before you quit out of the shell.
9. Now we are good with connecting to the server as "nx" from the shell. Try creating a client configuration using the "NX Client for Linux".
10. Mostly this should work and connect you to the server. In cases it doesnt and throw messages like "Authentication User: nx
Using auth method: public key
Authentication failed"
Chances are that the key generated as part of the server may be stale. Go to the server machine and run a keygen
-bash-3.1$ sudo /usr/NX/bin/nxserver --keygen
NX> 704 Starting: server-keygen operation at: Tue Oct 07 12:36:25 2008.
NX> 704 Generating new ssh-keys. Please wait.
NX> 704 Keys generated correctly. Backing up files.
NX> 704 Back up of keys made. Updating files.
NX> 704 Keys updated. NX clients should now use key:
NX> 704 /usr/NX/share/keys/default.id_dsa.key
NX> 704 to get connected to this NX server.
11. Copy the key from /usr/NX/share/keys/default.id_dsa.key into your NX Client wizard and try connecting. This should work perfectly.
Happy NX Machine!!
If you have issues with connecting, drop me a post and I can try to fix it.

No comments:

Post a Comment