I'm trying to setup passwordless SSH access.
My username is bmccann, so in /etc/ssh/sshd_config I added:
PermitRootLogin no
PasswordAuthentication no
AllowUsers bmccann nx
I ran ssh-keygen on the client and put ~/.ssh/id_rsa.pub from the client into ~/.ssh/authorized_keys on the server.
I can now login with no password using the ssh command. However, I can no longer access the machine via NX as long as /etc/ssh/sshd_config has "PasswordAuthentication no".
Server error logs:
$ grep NX /var/log/messages
Feb 11 01:25:51 bmccann-htpc NXSERVER-3.4.0-12[23552]: ERROR: Failed authentication. NXSsh exit status is:255 'NXNssUserManager::auth'
Feb 11 01:25:51 bmccann-htpc NXSERVER-3.4.0-12[23552]: Failed SSHd authentication for user 'bmccann', to '127.0.0.1', port '22': 'NX> 204 Authentication failed.\n ' 'NXNssUserManager::auth'
Feb 11 01:25:51 bmccann-htpc NXSERVER-3.4.0-12[23552]: ERROR: Error while trying to authenticate user:bmccann. NXNssUserManager::auth returned 255 'NXShell::handler_login'
Feb 11 01:25:51 bmccann-htpc NXSERVER-3.4.0-12[23552]: ERROR: failed 'sshd authentication' for user 'bmccann' from '108.29.137.64'. NXShell::handler_login NXShell 373
What do I need to do to restore my NX access? Is there something I need to setup in the NX client so that it no longer asks me for a password?
Bring back the change in /etc/ssh/sshd_config and restart OpenSSH server.
Use password or authorized keys. Empty passwords not allowed with PAM authentication.
I couldn't find a way to get NX to stop prompting me for a password, but the following worked to allow a password to be used with NX:
I added more details on my blog.