
# Specify how clients will have to authenticate to the server, by On the server, edit server.cfg ( sudo gedit /usr/NX/etc/server.cfg) and find this section: # Note: On Linux, server.cfg is located here: "/usr/NX/etc/server.cfg". The server.cfg and node.cfg files explained (for server v.Prevent password authentication with NX protocol and key-based authentication.(Not exactly addressing this question, but indirectly helpful in figuring it out) NB: Do NOT do this until key-based authentication is set up & verified to be working, or else you'll lose the ability to remotely connect via NoMachine, & have to manually fix it remotely over ssh, or locally! To disable password-based login to server:

Generate a new private/public key pair from the client run this from the client: ssh-keygen -t rsa -b 4096 -C "your personal comment or email"Ĭopy the public (.pub) key only from client to server run this from the client notice the renaming of the file on the destination to avoid conflict with keys already generated on the server: scp ~/.ssh/id_rsa.pub Run from server:Īdd public key now on server to proper NoMachine file run this from the server: cat ~/.ssh/id_rsa_nxclient.pub > ~/.nx/config/authorized.crtĪnd lastly set this file's permissions to 0600 to enable read/write on this file ONLY for the user (owner) of this file, for security: chmod 0600 ~/.nx/config/authorized.crt Here's one example of commands to do that: How to set up key based authentication with NX protocolĮssentially, just add your public key to the $HOME/.nx/config/authorized.crt file on the server.To enable key-based authentication to server: It is not open source, but is no cost to use (personal use only-businesses must pay). NoMachine is an excellent remote login program, with excellent file-sharing/mount abilities and excellent cross-platform support for Windows, Mac, Linux, iOS, Android, Raspberry Pi, and ARM. If you ever need to ssh in, I've documented my various ssh notes here. Finally, run /usr/NX/bin/nxserver -restart and you should now be able to login.I originally posted these instructions on my eRCaGuy_dotfiles repo here: The nx user needs to be in the wheel group (su), so run usermod -a -G wheel nx. Remedy it with /usr/NX/bin/nxserver -useradd -administrator. In that case, run /usr/NX/bin/nxserver -userlist and verify there are no users. Anyway, now you can try to log in, but you'll probably fail. If you don't install to /usr/NX, you may find an error starting the nxnode or nxd services.

If you want to add the /etc/init.d/nxserver service to startup, you'll have to use rc-update yourself. This page is accurate to start out with: Extract the archive to /usr/NX, run the installer with -install redhat. I'm putting this out there in case anyone else had some issues. I had some trouble getting the NoMachine server to work on my Gentoo box, but eventually I prevailed.
