5

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.

2 Answers2

0

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
kalou.net
  • 446
  • 1
  • 4
  • 16
0

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