Openstack version - Pike
In Openstack there is no provision to change the keypair of any active instance. Queens and Rocky give the option in rebuild command, but that will re-create the instance again. 1. Is there any way to change the keypair of instance without re-creating it? 2. Why there has been no provision, is there any security threat to change keyair in active instance?
Kindly if anyone give answer to the above question.
as described in https://bugs.launchpad.net/nova/+bug/1843708 , one of the commands below should work:
nova --os-compute-api-version 2.54 rebuild --key-name key1 instance1 IMAGE_NAME
OR
openstack --os-compute-api-version 2.54 server rebuild --image "IMAGE_NAME" --key-name key1 instance1
Unfortunately there is no "official" way to do that in Openstack.
I wrote an article about the 2 options available of how to change the keypair:
https://osie.io/blog/changing-the-ssh-keypair-for-an-active-openstack-instance
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.