OpenStack | KeyPairs
KeyPairs are used to login to a remote system with out entering username/passwords each time
command syntax: openstack keypair <action/operation> <--flags values> <keypair-name>
#to check the list of keypairs
cumulus@server01:~$ openstack keypair list
#lets generate a new keypair, here '>' refers to redirection, here we are redirecting the output to a file named firstKeyPair.pem, instead of printing it on the terminal
cumulus@server01:~$ openstack keypair create firstKeyPair > firstKeyPair.pem
#let's set the permission on this file, to allow access only to the current linux user
cumulus@server01:~$ chmod 400 firstKeyPair.pem
#let's view the contents of this file
cumulus@server01:~$ cat firstKeyPair.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAvzu5tl+UL2SxZ9cv4qVhuAurdWOF97LpVhHxa1sQBvxGn5bS
GCjhQA2ehQq0kebJSy1DX5u1wlXHRak+bJgF2I4mA+vX88DwKlEu2w7ZDNd08hVk
SMBIQCLozoqjAwnofYbm04vk4aVgNpdgYOHdGBY42veyxLjZDNTMGpCP6LbDPqTf
STlbcwZ61YszboDocxgIeggbTeVPTjkaXGd9tOqduN+2ep0Q/zMwTZWjYXTlb/AB
h9z1/R8u/rYBgUYACtJ7lIpS1LtvX2R+gWi1y9PINokp+rjCqBTiQniZhzHE9lxL
UnyhQWFlVAE06yGIvnnVEtodoEvIO2aTKnF5bwIDAQABAoIBAG8HHCHYiE6j5aRm
eXTblEqo69lx+PwBMhw4urQb4MhNfCt4A27nfTAVOC4CMyhqmAA/vVgrLXIxH0tA
oe+mq+45SbUJHw50vHu1OsEQc9BS36EV7m2WxdwG6KfSMia3f/Yxdp7oH/EqdRv8
84YMXLN5Y3UuTuqMb+hVPFNID2WKhexQhZWWVBg2O/HyJfcPj91bMumZ99VqOYDE
ygWMP1WrTxX4yL2Lg4p1lz4bXUQC+AE5JyZOugEa0Pg0b7JTAHPr+qaQTKg0Bfzo
cIEf4VMVPJLVn/281gm/7fqQi6SQ/VBCxZ51oV/Z9EyvSiA9Tg4poug6W9/uNZWT
dumkq8ECgYEA5LbXJnW1rpfz0TQvZcXo6xrMCfs1cHkj5rcbwO4VWgVVAk3bdDa3
8Zqu4renRf6NVep66v2WHpwPaQx/70oAjV4Y01rpynr8vKtov/TYtlx9Scsnor7y
nW0jVhpiyYee+t1uQDv4759+59a6wUZ3fmzKWsDM+aehjCFzZIBffX8CgYEA1gwu
Nynm/vXjcczcdOGfkpQ4/hKoZ+e6YNwg3pbLbPe7JOqDTi9cBptehUui9jJXH8Ex
sq/cL+g8H6Z4tLEVZDQMkatS3rUpBqKb3GkrsaOw+WE0+E7xdjRSy7FAflOWmSm8
XVl592DQ7dsetfUbnshQwQTmUb8j3dttKE4/3BECgYAlonCEw5nBwP89zXh/JrHM
/fvVKKECgOyHaloGxSZ+SaJTXrxdwyNBflKIu++qdNiM6qiPQmsRXlyqzIPAvEya
9oDfRnZx+wrbgNkbvQ5r84wqOGOtQ/5oKS1HXdAjmU1vukAKEdREmdooDA1vAElp
ZD1n8ZHJAuxyQo7aWsVbwQKBgQDCYstxw3cJYkrM5WvsJZ6iIkPj0RPpUNO89QxQ
uQdDDXOCYgse7PmY8m6ThQ4YobznlK7KhNTlGPXJFIiYKB2yI2aqv7kBkeoRIYmE
UGqi53Jn93SAcEjuvTPX0kAsuUKSFAoBiKmwE9eJuy4XtuH/gBF+STHVWU18RLLM
IMvz0QKBgQDUs7UASRbkAZaakDCai2M78PcNAVkFJXIiQ+D5cbtmKF12jB84yjPj
3Wg6zTSI/Xt+TjVcswdfSbZOGXwK7HwSgKOS8AUHD+MH0FVt2hIpade1o4JAm0ne
+rE9HAUcL7kH1GQLHvOSrEl8TfphlcJ2fVhsM2Bk0wwnwQP1hjA/oQ==
-----END RSA PRIVATE KEY-----
#lets check the openstack keypair list
cumulus@server01:~$ openstack keypair list
+--------------+-------------------------------------------------+
| Name | Fingerprint |
+--------------+-------------------------------------------------+
| firstKeyPair | 48:2f:50:e9:e4:df:be:09:f9:7e:3d:95:54:1d:c0:f5 |
+--------------+-------------------------------------------------+
#to view more details about the keypair
cumulus@server01:~$ openstack keypair show firstKeyPair
+-------------+-------------------------------------------------+
| Field | Value |
+-------------+-------------------------------------------------+
| created_at | 2018-07-08T12:50:50.000000 |
| deleted | False |
| deleted_at | None |
| fingerprint | 48:2f:50:e9:e4:df:be:09:f9:7e:3d:95:54:1d:c0:f5 |
| id | 1 |
| name | firstKeyPair |
| updated_at | None |
| user_id | 17b0c21a5161488e85891464c77edfac |
+-------------+-------------------------------------------------+
--end-of-post--