NoMachine is a terminal server software that allows one to remotely connect to a remote desktop over a network (e.g. the Internet). It provides features similar to those found in products like Apple’s Back To My Mac, or protocols like RDP (Remote Desktop Protocol, used in Windows systems) or XVNC/X11 (used in UNIX systems). In this post, I’ll discuss release 4.X of NoMachine. Older versions like the 3.X releases, work in different, incompatible ways.
There are multiple editions of NoMachine’s server component. I’m interested just in the Free Edition, which is available at https://www.nomachine.com/download. I’ll ignore the Terminal Server and Enterprise editions, as they are generally expensive for the average home user to use.
The Free edition allows one to remotely connect to an existing desktop on a remote computer. For example, when installed on a Linux server, it attaches to the desktop session running on the console, allowing one to remotely control it. This works in a very similar way to what Apple’s Screen Sharing feature does.
According to https://www.nomachine.com/AR10K00728, the Free edition only supports the NX protocol for connecting and authenticating remotely to the server. The NX protocol supports password and public key authentication. For password authentication, nothing special has to be done. However, in order to enable public key authentication, one has to add the SSH public key to the NX configuration file that corresponds to the user. Based on instructions from https://www.nomachine.com/AR02L00785, it’s just a matter of concatenating the user’s public key to his
$ cat path/to/ssh-public-key >> ~user/.nx/config/authorized.crt