Authentication failed with private key

Forum / NoMachine for Linux / Authentication failed with private key

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32680
    webangel
    Participant

    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.

    #32717
    Carin
    Participant

    Hi 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!

    #32722
    webangel
    Participant

    Hello, 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

    #32740
    Carin
    Participant

    Hi 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-side authorized.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!

    #32742
    webangel
    Participant

    Hello 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.

    #32803
    Carin
    Participant

    Hi webangel,

    We are glad the issue is resolved. Thank you for letting us know!

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

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