NoMachine NX Key Based Auth
This will likely be updated.
I saw a request for some help in setting up key-based auth in NoMachine NX tonight just as I was going to bed and decided to do that instead. I believe the request is for Mac-to-Mac, but for the moment I'm doing bi-directional Linux-to-Mac and Mac-to-Linux. If I make any changes at all in how I set the Mac side up vs the Linux side I'll note them of course.
So here is the basic Linux client to Mac server. In testing I set this up Linux-to-Linux. The commands I used were exactly the same on the Linux and Mac servers.
Amber is my client, Green is the Mac Server:
On the client, generate the keys to use. There's no reason you couldn't use your regular ssh keys, but I didn't want to do that for testing this.
I put the new keys in ~/.ssh/nx-auth-keys, and when running ssh-keygen I just had it put it at ./id_rsa:
On the Mac server, the file we're editing is ~/.nx/config/authorized.crt. Paste in the Public Key from the client:
In the NX client app, now you can change the auth-type to key-based:
Edit your connection, choose Configuration, and choose "Use key-based authentication", hit the Modify button to the right:
Hit the ellipsis to pick the file:
Choose your private key file here:
And just because it took me way too long to find, you gotta hit the "Back" arrow at the top left, of course.
- xrayspx's blog
- Log in to post comments
- 1035 reads