What if I forgot to add SSH key to my VM (or deleted it)?
Openstack only allows to add SSH key to your VM during its creation, so if you forgot to add SSH key to your VM at start you may consider following options:
- You can try logging in using OpenStack Console in Horizon (see: https://creodias.eu/-/a-8?) and add SSH key as per this article: https://creodias.eu/-/how-to-add-ssh-key-from-horizon-web-console-?
- 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, or detach Volume and create new VM.
- If you have important data and you have accidentally deleted your SSH key (either from the computer you connect from or the VM itself) you may:
- Create a Snapshot of your VM
- Shelve your old VM (You will not be able to do this if your VM is "Fixed term")
- 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 avaliable (like Security Rules and SSH keys). If you have no SSH keys avaliable use this guide to create one:
Go to "Access & Security" tab in Horizon.