Solution for Invalid key in SSH – GCP

SSH-key

Error: Invalid key. Required format: <protocol> <key-blob> <username@example.com> or <protocol> <key-blob> google-ssh {“userName”:”<username@example.com>”,”expireOn”:”<date>”}

Try the following steps:

  • Realign the ’rsa-key-<value>’ section. Cut and paste the rsa-key-20210820 to the first position of the key.
  • Add username(mail id) to the end section of key value.
  • Try out these methods with different combinations.
  • Replac the Key Comment Textbox with our username which is our mail address.

The newer version of puTTYgen detects its key type automatically. And it will be RSA (most probably). So, reset the option to RSA and generated the keys.  

Leave a comment

Your email address will not be published. Required fields are marked *