Forum / NoMachine for Linux / Authentication failed with private key
- This topic has 5 replies, 2 voices, and was last updated 3 years, 7 months ago by Carin.
-
AuthorPosts
-
April 1, 2021 at 10:24 #32680webangelParticipant
Hello,
I have an Ubuntu 20.4 LTS client laptop and NoMachine 7.4.1 free version without firewall I cannot connect to another Debian 10.9 and NoNachine 7.4.1 free desktop PC without firewall version
with private key authentication I get an error message “Authentication failed, please try again. “. I followed the documentation provided here: https://www.nomachine.com/AR02L00785
I still restarted NoMachine server:sudo /usr/NX/bin/nxserver – restart
NX 162 Disabled service: nxserver.
NX 162 Disabled service: nxnode.
NX 162 Disabled service: nxd.
NX 111 New connections to NoMachine server are enabled.
NX 161 Enabled service: nxserver.
NX 161 Enabled service: nxnode.
NX 161 Enabled service: nxd.Do you need log files by email?
Thanks for the help.
Best regards.April 1, 2021 at 17:57 #32717CarinParticipantHi webangel,
Did you use only NX protocol? If that is the case, try to use SSH protocol as well.
Can you also try to run the following terminal command:
ssh -i <private_kay_path> <user_name>@<remote_host> -vvv
and let us know if this ssh command was completed successfully?Last, can you please send us server-side logs? You can check the following article for guidance: Collect server and client logs manually. The logs can be sent directly to forum[at]nomachine[dot]com making sure to use the topic as the subject of the email.
Thanks!April 2, 2021 at 09:27 #32722webangelParticipantHello, Carin
Please help me, I am using nx protocol with authentication via id_rsa file on nx GUI client and ~ / .nx / config / authorized.crt file on remote server for public key.
I cannot use the ssh only protocol with NoMachine because it apparently did not support NoMachine client free.
I just tested an ssh connection on the local network with the command you gave me, it works very well, I am using the ssh agent for the automatic taking into account of the passphrase, maybe this is a problem? I send you the server log file, hope you can help me?
Thank you very much Carin
Attachments:
April 2, 2021 at 14:38 #32740CarinParticipantHi webangel,
The server-side logs show that PAM does not recognize the user and nxserver cannot recognize the public key as well.
So it seems that public key is not present in~/.nx/config/authorized.crt
Can you please check if the public part of private key is fully inserted in this file and is pasted there correctly?
The command to get the public part from private key is the following:ssh-keygen -y -f ~/.ssh/id_rsa > /tmp/id_rsa.pub
In nxplayer the private key should be selected, whereas on the server-sideauthorized.crt
only the public part should be placed/inserted.
Please check all the above again, to make sure that all the information present is correct and that the private key on the client-side has the correct permissions.
It is possible that the public key might have been “damaged” while ‘sent’ to server-side.
If the login fails again, please send us both client and server-side logs. Thanks!April 6, 2021 at 10:59 #32742webangelParticipantHello Carin,
Thank you very much for your answers.
I checked the ownership of the authorized.crt file, it belonged to root and group root.
I made a chown for my user and now it works perfectly in LAN and internet connection. Thank you very much for the help you gave me.
Best regards.
April 7, 2021 at 11:24 #32803CarinParticipantHi webangel,
We are glad the issue is resolved. Thank you for letting us know!
-
AuthorPosts
This topic was marked as solved, you can't post.