Error 'Invalid Public Key Format' Config SSH Public Key Auth Fails

Error 'Invalid Public Key Format' Config SSH Public Key Auth Fails

11820
Created On 09/25/18 17:46 PM - Last Modified 08/05/20 18:37 PM


Symptom

When SSH public key authentication is configured from the GUI, the configuration works. But, when configuring from the CLI it fails with the following error message, 'Invalid public key format':
pki.JPG

Confirm that valid algorithms, number of bits, version and SSH key formats are being used.

Please note the following:

  • Supported key file formats are IETF SECSH and OpenSSH. 
  • Supported key algorithms are DSA (1024 bits) and RSA (768-4096 bits).


Environment
  • PAN-OS
  • SSH


Resolution

The generated public key should be encoded in Base64 format before pasting the key to CLI:

pki2.JPG

While importing the file from the GUI, the error cannot be seen because the GUI automatically does the Base64 encoding while importing the file, but while configuring the CLI, this has to be addressed by the administrator.



Additional Information


Attachments
Actions
  • Print
  • Copy Link

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

Attachments
Choose Language