I will now run instances that can be accessed without a password.
You have already imported an existing SSH key using the GUI.
Using the commandline, I will now create a new key.
This also works in the GUI, by the way, and the commandline can also
be used to import an existing key as you just saw.
This command does a few things. It generates a new SSH keypair,
deposits the public key in Nova's database under the name mykey,
and outputs the private key. It doesn't not remember the private key,
it's your responsibility to keep it in a safe place.
Now I launch another server, and specify the name of the new keypair.
The instance will pull the key from Nova when it starts up for the first time.
We will explore shortly how this is done.
Here you can see the key, the instance is running.
To access it, we'll need the SSH security group and a floating IP.
I will do that quickly, we have seen this before.
A quick check, oops, and it seems to be working.
I will now enter the instance using the key, and hope I don't have to
provide the password. Well, SSH is quite picky about the permissions
of the key file. The file must only be accessible by the owner.
So let me change that, oh, that's not what I wanted, so this is much
better, only the owner must be able to read it.
And I'm in, and I didn't have to provide the password.
Finally, let's view the keypair database.
We have two keys in here, the second key, webserverkey, comes from an earlier demo.
What kind of detail do we have in the database?
Not too much detail, but I can add the --publickey option, and get the
public key out of the database. This is definitely useful in certain circumstances.