SSHd does not allow publickey authentication due to libcrypto bug

6,605

Actually, increasing the log level does not showed up anything related.

It only seems the client just jumped over the next possible key (DSA) which I have not got and then the method was dropped and password has been asked.

My client is a 14.04LTS, server is 16.04LTS.

The key was generated long time ago (by the time I was installed 14.04LTS).

The solution was to regenerate the RSA keys on the client and now it works as intended. Somehow the 16.04LTS is not backward compatible with the keys generated long time ago.

Share:
6,605

Related videos on Youtube

Daniel
Author by

Daniel

Updated on September 18, 2022

Comments

  • Daniel
    Daniel over 1 year

    I can not login to my server with public key.

    Server details:

    • Ubuntu Server 16.04LTS
    • SSHd: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016

    My public key is added to /home/user/.ssh/authorized_keys, but publickey authentication method is dropped when I try to connect.

    Only one line in the /var/log/auth.log is corresponded:

    sshd[3830]: error: key_verify: error in libcrypto
    

    Ubuntu on the server is fresh, just upgraded to the latest kernel and packages.

    Anybody has any idea how can I overcome on this situation?

    • dortegaoh
      dortegaoh over 6 years
      It's pretty unlikely that this is the result of a bug. Please add the actual configuration of your server to your question. The rest of the log file related to your login attempt might be relevant as well.
    • the_nuts
      the_nuts about 6 years
      I have the same issue, did you find a solution?
    • Daniel
      Daniel about 6 years
      You will need to recreate the keys and then it will be fine.
  • Michael Hampton
    Michael Hampton over 6 years
    How long ago? Keys generated between 2006-2008 on Debian-based systems were weak due to a bug, and get rejected today.