#1 Fails to login - defaults to login with key-file?

Fritz Elfert
Tomas Groth

I'm trying to login to a server, but the login fails with the following error message: "Unexpected termination of nxssh". Running in the console in verbose mode doesn't give any information.
But I have a feeling that opennx always tries to login using key-files, and therefore ignores my password, and so fails to login. My "feeling" is based on an error message I got when I hadn't configured the nx-system-folder correctly, giving the following error message:

execvp(/home/tgc/opennx/src/opennx/bin/nxssh, -nx, -x, -2, -p, 22, -o, RhostsAuthentication no, -o, PasswordAuthentication no, -o, RSAAuthentication no, -o, RhostsRSAAuthentication no, -o, PubkeyAuthentication yes, -i, /home/tgc/opennx/src/opennx/share/keys/server.id_dsa.key, -B, -E, nx@term.tgc.dk) failed with error 2!

Especially "PasswordAuthentication no" tells me that opennx doesn't do what it is supposed to do...


  • Fritz Elfert
    Fritz Elfert

    Nope, wrong assumption ...
    This is how it is supposed to work (NoMachine's client does this as well). NX always uses two stages of authentication:

    1. Login into the nxserver, always using a key (default: NoMachine's well known pubkey, but can be pasted in the advanced config). Also: this is always done as user nx, not the user you specify in the login dialog.
    2. The actual user/password based login versus nxserver's command-shell inside the first connection.

    What you see (the execvp message) is from stage 1. Error 2 is ENOENT and this means: Your nxssh binary (/home/tgc/opennx/src/opennx/bin/nxssh) could not be found. Apparently, you are trying to run an uninstalled opennx from within the source directory. This cannot work without changes. Reason: Just like NoMachine's original, when started for the first time, OpenNX finds out it's own path and sets a config variable "System NX dir" to the parent directory. This makes perfect sense if installed in /usr/NX/bin but fails in your case.

    Two solutions are possible:
    1. remove OpenNX's environment-config file at ~/.opennx, install opennx into /usr/NX/bin, then try again.
    2. If you just want to try it out without installing, Start OpenNX, select "Configure", select the "Environment" tab. Correct the "System NX dir" (should point to /usr/NX, or whereever your regular nx env is) entry, klick apply.

    Please use the mailing list for further help and/or discussion.