What if I Forgot to Add the SSH Key to my VM - or Deleted it?
OpenStack only allows to add a SSH key to your VM during its creation, so if you forgot to add an SSH key to your VM at the start you may consider following options:
If your VM is new and doesn’t have any important data, or attached Volumes with data, you can just delete it and create a new one.
If the VM has attached a Volume, you can detach the Volume, delete the VM, create a new VM and attach the volume again.
If you have important data and you have accidentally deleted your SSH key (either from the computer you connect from or from the VM itself) you may:
Create a Snapshot of your VM
Shelve your old VM
Run new VM from Snapshot. If all works you may delete the old VM.
When you start new VM from Snapshot you will have all starting options available (like Security Rules and SSH keys). If you have no SSH keys available just create a new one in Project → Compute → Key pairs.