How to set up private key authentication?

Forum / NoMachine for Linux / How to set up private key authentication?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #21390
    jjgalvez
    Participant

    how do I set up private key authentication for NX on Linux? The docs I see online only show examples for things like oath and google-authenticator. I would think that using a private key would be simpler and easier but I can’t see to find examples of how to set it up. Any help would be much appreciated

    #21395
    Britgirl
    Keymaster

    Does this help?
    How to set up key based authentication with NX protocol
    https://www.nomachine.com/AR02L00785

    #21398
    jjgalvez
    Participant

    So I followed those instructions

    Created a key, appended the pub cert to the end of .nx/config/authorized.crt

    On the client I checked “private key” and imported my private cert

    But when I try to connect nothing happens. BTW the cert has not passphrase so none was entered

    Not sure where to go from here

    #21399
    jjgalvez
    Participant

    I looked at the nxserver log and there I see a public key not recognized error

    #21401
    jjgalvez
    Participant

    OK so one thing I did wrong is that I created the cert pair on the server and not on the client was the connecting to the server, once I created the cert on the client and imported the correct pub cert on the server I was able to connect with just my certs.

     

    #21463
    DavidB
    Participant

    Are keypairs device-specific then? I created a keypair using Ubuntu WSL on Windows 10 with the intention to use the keypair on my Raspberry Pi server and Android phone client but it is not working.

    #21527
    Britgirl
    Keymaster

    Make sure you have already generated an SSH key pair, for example by using the ssh-keygen tool on a Linux host and that the keys are in OpenSSH format. (https://www.nomachine.com/AR02L00785) We tested on the fly to make sure and it works fine.

    #21546
    DavidB
    Participant

    Okay I figured out what I was doing wrong. I thought that the issue was with my keys that I made using ssh-keygen so I used the key generator that ships with NoMachine to generate them, then noticed that I was saving the key to the wrong location. I was following the instructions for setting up SSH control and not just authentication.

    #21561
    Britgirl
    Keymaster

    Glad to know that it’s now working 🙂

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

This topic was marked as solved, you can't post.