Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

SSH Key Issues on GCP VM - Requires New Key Generation

I am experiencing an issue where the SSH key for accessing our GCP VM stops working after a day or two. After this happens, I am forced to create a new SSH key in order to regain access.

Could you please assist in troubleshooting this issue or let me know if there’s something specific on the server side that may be causing the SSH key to become invalid? It’s important for us to find a permanent solution to ensure uninterrupted access.

0 1 213
1 REPLY 1

Hi @Amitdehraj

Welcome to Google Cloud Community!

There are several reasons why your SSh may not be working correctly. To identify and resolve the issue, refer to Troubleshooting SSH errors guide for specific error messages and solutions. Note that when you add SSH keys to your Google Account, Compute Engine generates a username using your email. Make sure the service account that created the VM has the required permissions. You can check the Compute OS Login External User role for the permissions needed to add an SSH key. 

For more reference in Adding SSH keys to VM’s please refer to following links:

If you have questions, clarification and need further assistance with your issue, please feel free to reach out to our support team.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.