Current versions of NoMachine don't support the possibility to authenticate automatically to the remote node when two-factor authentication is enabled. I.e. it's not possible to provide the second authentication and the 'nxserver --nodeadd' procedure fails with:
596 ERROR: Cannot authenticate to the requested node.
The suggested workaround is:
1) Copy the server DSA public key, /usr/NX/etc/keys/node.localhost.id_dsa.pub, from the server to the remote node.
2) On the remote node host execute:
$ /etc/NX/nxserver --keyadd <path to node.localhost.id_dsa.pub file>
3) On the server host execute the 'nxserver --nodeadd' command to add the remote node.
Now the node should be added without requiring passwords.
For further references:
Using two-factor authentication with NoMachine