When you launch a virtual machine, you can inject a key pair, which provides SSH access to your instance. You can create at least one key pair for each project. You can use the key pair for multiple instances that belong to that project. If you generate a key pair with an external tool, you can import it into OpenStack.
Add/import key pair
You can generate a key pair or upload an existing public key
Add key pair
# To generate a key pair, run the following command (if "--private-key" flag is not used, print private key in console). $ openstack keypair create <name> [--private-key <name>] # If you have already generated a key pair $ openstack keypair create <name> --public-key <file>
To delete a key pair
Delete key pair
$ openstack keypair delete <key> # Verify that the key has been deleted $ openstack keypair list
Create and manage security groups
A few basic commands to manage security groups
Manage security group
# To list the security groups for the current project $ openstack security group list # To create a security group with a specified name and description $ openstack security group create <name> --description <description> # To delete a specified group $ openstack security group delete <group>
asd
You cannot delete the default security group for a project. Also, you cannot delete a security group that is assigned to a running instance.