Issue link: https://read.uberflip.com/i/1334488
Chapter 2 39 Listing and deleting keypairs using Nova Client To list and delete keypairs using Nova Client, carry out the set of commands in the following sections. List the keypairs To list the keypairs in our project using Nova Client, we simply run the nova keypair-list command, as follows: nova keypair-list This brings back a list of keypairs in our project, such as the following: Delete the keypairs To delete a keypair from our project, we simply specify the name of the key as an option to the nova keypair-delete tool. f To delete the myKey keypair, we do the following: nova keypair-delete myKey f We can verify this by listing the keys available, thus: nova keypair-list Deleting keypairs is an irreversible action. Deleting a keypair to a running instance will prevent you from accessing that instance. How it works... Creation of a keypair allows us SSH access to our instance and is carried out using the euca-add-keypair or nova keypair-add commands. This stores the public key in our backend database store that will be injected into the .ssh/authorized_keys file on our cloud instance, as part of the cloud instance's boot/cloud init script. We can then use the private key that gets generated to access the system by specifying this on the ssh command line with the -i option. We can of course also remove keys from our project, and we do this to prevent further access by that particular keypair. The commands euca-delete-keypair and nova keypair-delete do this for us, and we can verify what keys are available to us in our project, by running the euca-describe-keypairs or nova keypair-list commands. www.it-ebooks.info

