This problem occurs when a NoMachine client v. 7 connects to a NoMachine server v. 7 with the ClientMenuConfiguration key enabled in the server configuration file, server.cfg. It affects only connections by NX protocol.
When the user authenticates by private key, he/she gets this message:
Error is 22: Invalid argument
As a possible workaround, you can disable the use of the ClientMenuConfiguration key or connect by SSH protocol.