Funny you mentioned [1]; that is what I have been trying to use and could not find an option to get the name of the keypair. On Thu, May 27, 2021 at 1:44 PM melanie witt <melwittt@gmail.com> wrote:
On 5/27/21 07:44, Mauricio Tavares wrote:
Is there a way to query openstack about which ssh pubkey was used with a given server?
Yes, you show the details for the server (openstack server show) [1][2] to get the name of the keypair and then you show the details for the keypair (openstack keypair show) [3][4]. By default, you have to be admin to show the details of keypairs.
HTH, -melanie
[1] https://docs.openstack.org/python-openstackclient/latest/cli/command-objects... [2] https://docs.openstack.org/api-ref/compute/?expanded=show-server-details-det... [3] https://docs.openstack.org/python-openstackclient/latest/cli/command-objects... [4] https://docs.openstack.org/api-ref/compute/?expanded=show-keypair-details-de...