Public key authentication fails to PSM for SSH server: RSA key is not allowed

Public key authentication fails to PSM for SSH server: RSA key is not allowed

172
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 15:56 PM


Symptom


When attempting to use a public SSH Key, the connection fails and falls back to keyboard-interactive to enter in the vault user's password.You also observe the following debug log output in /var/log/secure where LogLevel DEBUG3 has been enabled in /etc/ssh/sshd_config:
"debug3: mm_answer_keyallowed: publickey authentication test: RSA key is not allowed"


Environment


10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8 PSM for SSH using Public Key Authentication (Integrated Mode)
Tested against RHEL 8.5/OpenSSH 8.5p1 with PSM for SSH v12.2
 


Cause


This is due to deprecation of SHA-1 used for host key verification and public key authentication where signing and verification is performed is being deprecated. Please see this article for more information:
Demystifying “ssh-rsa” in OpenSSH Deprecation Notice 

It is advised to re-generate public/private keys using a more secure algorithm. Per OpenSSH's deprecation notice:

"It is now possible[1] to perform chosen-prefix attacks against the SHA-1 hash algorithm for less than USD$50K.
For this reason, we will be disabling the “ssh-rsa” public key signature algorithm that depends on SHA-1 by default in a near-future release.

[1] “SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust” Leurent, G and Peyrin, T (2020) https://eprint.iacr.org/2020/014.pdf"



Resolution


Generate an SSH public-private keypair using a more secure algorithm such as EDDSA or RSA-SHA-256/512 using:

  • RSA option using PuTTYGen included in PuTTY v0.75 or higher
  • Using OpenSSH: ssh-keygen -t <algorithm>, where <algorithm> is replaced with rsa-sha2-256, rsa-sha2-512, ed25519, etc.


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj000000121QCAQ&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail