My ssh Keys in Vm Instance are showing "expireOn":"2020-11-20T00:06:44+000"
since then i am unable to connect to my VM and also not able to connect via SSH
Please guide on how to update the ssh keys on GCP
My ssh Keys in Vm Instance are showing "expireOn":"2020-11-20T00:06:44+000"
since then i am unable to connect to my VM and also not able to connect via SSH
Please guide on how to update the ssh keys on GCP
You can upload your own SSH key. But I advise you to use Cloud IAP (Identity-Aware Proxy) to securely access your VMs. Protecting your cloud VMs with Cloud IAP context-aware access controls!
Reading the second error you posted, I think that the resize of the disk didn’t work as you expected. Also, I think that you are trying to add a SSH key because you are unable to access via SSH as usual, but unfortunately you wouldn't be able to access even if you add your own SSH keys, unless you fix the disk size issue.
You should check if you have partitions, because it could be that /home/ is a different partition and it should be resized as well. Here you have the documentation that explains in detail how to resize partitions in a Linux Instance.
To access your Instance, alternatively to SSH you could use Serial Console
#! /bin/bash echo "root:<---YOUR-PASSWORD--->" | chpasswd
NOTE: Change the value "<---YOUR-PASSWORD--->"" for a password of your choice. For security reasons, I would recommend you to remove the startup script and change the password from within the instance once you regain access to the instance, otherwise anyone with view access to this VMs can see the password.
Once you were able to access your Instance, you could check your partition table and the space left with this commands:
Then, you should follow this documentation to resize partitions in Linux Instances that I previously mentioned.
Regards