Adding Public Keys
Public Keys in OpenStack¶
Public keys in OpenStack are used to authenticate users in their instances. When creating an instance, OpenStack copies the public key to the instance, allowing the user to log in. For Windows instances, which cannot be accessed using SSH by default, the keys are used to encrypt the generated password. The user decrypts such a password using a private key.
Generating an Asymmetric Key¶
1. Using the OpenStack Web Panel¶
Compute → Key Pairs → Create Key Pair
Provide a name and select SSH key.
The default encryption algorithm is RSA 2048 using SHA-256 hash function.
If you want to generate keys with different parameters, you can use the command line of your favorite Linux distribution.
2. Generating Keys via Command Line¶
Command: ssh-keygen -t ecdsa -b 256 -C "Description" (optional)
The generated public key should be sent to OpenStack:
- Via the OpenStack web panel:
Project → Compute → Key Pairs → Import Public Key
- Via the CLI:
First, you need to establish a connection using the OpenStack CLI – instructions here: CLI Client Configuration for OpenStack - For Linux (Ubuntu)
Sending the key: openstack keypair create --public-key Test1111.pub MyKeyName