I have a gcloud vm instance which run on RHEL9 and i am connecting to it from my local pc which run on windows 10
I was connecting to the vm instance through ssh connection for 1 month till 3 day ago, unfortunately i can't connect to it ssh from my pc although i still
open ssh window linked to the vm instance but i can't connect to the vm instance from my local pc
I tried to investigate the issue by checking the firewall and update the keys for 3 days but nothing worked until
I want to get rid of all ssh keys and create new one which will be the only one and not to be overwritten by expired ones
i noticed that the ssh keys linked
to the vm instance expired may be this is the reason
every time i create a new ssh key and update the vm instance with it,the old expired one is restored again blocking ssh connection
I checked the vm logs and found that there is ssh rejection happeb fron server side because of the expired ssh keys
I tried to update these keys for many times with different methods but nothing worked
I attached snapshot of the vm logs showing ssh rejection because of expired ssh keys
Welcome to Google Cloud Community!
You may try using the following command to trace and have detailed insights in using ssh from your machine:
ssh -v username@host-ip-or-domain
In any case that you encounter a verbose output of using different key, try the following command to use the exact private key generated.
ssh -v username@host-ip-or-domain -i <path-to-private-key-file>
For reference on using SSH keys, you may look on this guide.
I hope this information is helpful.
If you need further assistance, you can always file a ticket on our support team.