This problem occurs with NoMachine free installed on Windows and when the SSH_AUTH_SOCK environment is already set on the system by some other applications.
In this case, if the user is already logged on at the physical desktop and the NoMachine user tries to connect by remote, the session fails to start with message:
The session negotiation failed.
Error: Last operation failed