Issue link: https://read.uberflip.com/i/1334488
Chapter 2 37 Removing rules from a security group is done using the nova secgroup-delete-rule command and is analogous to the nova secgroup-add-rule command. Removing a security group altogether is done using the nova secgroup-delete command and is analogous to the nova secgroup-create command. Creating and managing keypairs Keypairs refers to SSH keypairs and consists of two elements—a public key and a private key. Only this specific combination of the public and private key will allow us access to our instances. Getting ready To begin with, ensure you're logged in to your Ubuntu client that has access to the euca2ools and Nova Client tools. These packages can be installed using the following commands: sudo apt-get update sudo apt-get install euca2ools python-novaclient How to do it... To create a keypair, we run the euca-add-keypair command when we're using euca2ools, or nova keypair-add when using Nova Client. We name the key accordingly, which we will subsequently refer to when launching instances. The output of the command is the SSH private key that we will use to access a shell on our instance. 1. First create the keypair as follows, when using euca2ools: euca-add-keypair myKey > myKey.pem Or for Nova Client, this looks like: nova keypair-add myKey > myKey.pem 2. We must then protect the private key output: chmod 0600 myKey.pem This command has generated a keypair and stored the public portion within our database, at the heart of our OpenStack environment. The private portion has been written to a file on our client, which we then protect by making sure that only our user can access this file. www.it-ebooks.info

