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:
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 accidentaly deleted your SSH key (either from computer you connect from or 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 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.