Authentication fails after NoMachine replaces SSL certificate

Forum / NoMachine for Windows / Authentication fails after NoMachine replaces SSL certificate

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #50266
    aakerberg
    Participant

    Windows 10 NoMachine client (latest version) connecting to RHEL 9 linux server Gnome desktop (I believe running Enterprise Desktop).

    Periodically when attempting to connect, a message pops up when attempting to connect to a certain server:   “Remote host identification has changed…. Do you want to proceed anyway and replace the old SSL certificate in the list of known hosts?”  (screenshot attached)

    However, when I allow it to proceed.  I then get an “authentication failed” error.  From that point on, NoMachine will not connect to that server – AND I can no longer connect with any other method (have tried various SCP and SSH clients I have available to me)

    I have tried updating to the latest version of the client as well as completely uninstalling and re-installing the Windows client.

    The only thing that works is to wait some period of time – usually a few days – and after a few re-boots of the windows machine, NoMachine will once again give the me “Remote host identification has changed…”  message and then when I allow it to replace the SSL certificate this time, everything works again (including my other SSH and SCP clients) for a few days… until that message pops up again and the cycle starts all over again.

    I am reasonably sure the Linux server identification has not actually changed.  No other users that connect to this server are having this issue.  The problem is unique to my Windows 10 machine.  It seems that for some reason, NoMachine thinks the SSL cert has changed, installs the wrong one which breaks everything… and then later puts the right one back in again.

     

    #50301
    Britgirl
    Keymaster

    Can you confirm the versions of NoMachine on both sides?

    #50366
    aakerberg
    Participant

    I can confirm that the version running on my windows machine is currently 8.14.2.  I updated and uninstalled/re-installed it as part of the debug for this problem.  I’m not sure what version it was running prior to that.  I’m not sure about the Server side as I can’t connect to it right now.  I have asked someone else to get it for me, and I’m still waiting for that.

    However, I have done some additional debug and I don’t think it’s the server at all, because I discovered that it exhibited the same behavior even when disconnected from the VPN – so there is no way it was even contacting the server.

    Other things I tried:

    I did a comparison of the hosts.crt file in C:\users\<me>\.nx\config\ with a couple of other users that connect to the same server.  Both of them had the same certificate as each other, but different than mine.  I used a text editor replaced my certificate so it matched theirs.   This workaround worked one time.  But the very next time I tried to connect, I had the same issue.  Looking at the certificate, it was wrong again.  However, this time, replacing it did not work.  Every time I tried to launch NoMachine and connect to that server, the certificate would get replaced with the wrong one again.  I tried deleting the hosts.crt file completely and each time I attempted to connect, a new host.crt with the incorrect cert would be created.  This happened both on and off the VPN, so I don’t believe that NoMachine was even attempting to connect to the server.

    Figuring that this invalid cert had to be coming from somewhere, I did some more digging.  I found a nx_host_rsa_key.crt file in C:\ProgramFiles\NoMachine\etc\keys\host folder.  The key in this file matched the “incorrect” key that had been causing me problems.  I edited this file with what I believed to be the “correct” key.   This worked for three days.

    After 3 days it stopped working again.  Now I have a slightly different problem.  I am now getting a “connection with the server was lost” error.  Here is what the logs say when that happens:

    Info: Starting NoMachine version 8.14.2.

    Info: Loading settings from ‘C:\Users\<me>\.nx\config\player.cfg’.

    Info: Loaded translation files for ‘English’.

    27424 26372 2024-10-23 08:02:48 663.208 Main: Creating the client session.

    27424 26372 2024-10-23 08:02:48 663.208 ClientSession: Initializing session at 0x000000000351ba70.

    27424 26372 2024-10-23 08:02:48 710.877 ClientSession: Initialized session at 0x000000000351ba70.

    27424 26372 2024-10-23 08:02:48 712.872 ClientSession: Starting session at 0x000000000351ba70.

    27424 26372 2024-10-23 08:02:48 717.694 ClientSession: Going to start session ‘C:\Users\<me>\OneDrive – <company_name>\Documents\NoMachine\Connection to <server_ip>.nxs’.

    27424 26372 2024-10-23 08:02:48 813.351 Connection: Initializing connection at 0x0000000006869ed0.

    27424 26372 2024-10-23 08:02:48 824.331 Connection: Initialized connection at 0x0000000006869ed0.

    27424 26372 2024-10-23 08:02:48 824.331 Connection: Starting connection at 0x0000000006869ed0.

    27424 26372 2024-10-23 08:02:48 824.331 ClientDaemonConnector: Starting a new connection to host ‘<server_ip>’ on port ‘4000’.

    27424 26372 2024-10-23 08:02:48 825.324 Connection: Started connection at 0x0000000006869ed0.

    Info: Connection to <server_ip> port 4000 started at 08:02:48 825.324.

    27424 26372 2024-10-23 08:02:48 843.665 ClientSession: Started session at 0x000000000351ba70.

    Info: Slave server running with pid 25776.

    Info: Listening to slave connections on port 32138.

    27424 26372 2024-10-23 08:02:48 859.580 Main: Entering the GUI event loop.

    27424 26372 2024-10-23 08:02:52 513.652 Connection: WARNING! Ignoring the I/O error and waiting for the daemon error reporting.

    Info: Connection to 10.1.10.5 port 4000 closed at 08:02:52 513.652.

    27424 26372 2024-10-23 08:02:52 513.652 Connection: Connection at 0x0000000006869ed0 failed.

    27424 26372 2024-10-23 08:02:52 513.652 ClientSession: Runnable at 0x0000000006869ed0 caused the session at 0x000000000351ba70 to fail.

    27424 26372 2024-10-23 08:02:52 513.652 ClientSession: Failing reason is ‘The connection with the server was lost’.

    27424 26372 2024-10-23 08:02:52 525.612 ClientSession: Stopping session at 0x000000000351ba70.

    27424 26372 2024-10-23 08:02:52 528.762 ClientSession: Destroying display client.

    Info: Slave server running with pid 17528.

    Info: Listening to slave connections on port 50743.

    27424 26372 2024-10-23 08:02:52 537.742 Connection: Stopping connection at 0x0000000006869ed0.

    27424 26372 2024-10-23 08:02:52 537.742 ClientDaemonConnector: Stopping the current connection.

    27424 26372 2024-10-23 08:02:52 537.742 Connection: Stopped connection at 0x0000000006869ed0.

    27424 26372 2024-10-23 08:02:52 553.803 ClientSession: Stopped session at 0x000000000351ba70.

     

     

     

    #50367
    aakerberg
    Participant

    Update:   Uninstalling and re-installing NoMachine client again seems to have resolved the latest issue.

    #50390
    Britgirl
    Keymaster

    Thanks for the update. Let us know here if you encounter the issue again. This topic will be kept open for a few weeks.

    #50400
    aakerberg
    Participant

    Uninstalling and Re-installing the NoMachine client on my machine only worked for 1 day.  When I attempted to log in this morning, I had the familiar warning “Remote Host Identification changed…”  And sure enough, once again the (bad) key in ProgramFiles\NoMachine……\nx_host_rsa_key.crt was different than the “good” key in Users/……/host.cert.   As soon as I clicked ok to proceed, I got the “connection with the server was lost” error and the key in host.cert had been replaced.

    One other note:  when I uninstalled NoMachine yesterday, I verified that the nx_host_rsa_key.crt file was deleted.  Now that it’s back, I compared it and it is identical to the “bad” key noted on previous occasions.  Where does NoMachine get this key from?  Some other location on my PC?

     

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Please login .