3.9. Managing compute SSH keys

3.9. Managing compute SSH keys

3.9.1. vinfra service compute key create

Create a new compute SSH key:

usage: vinfra service compute key create --public-key <public-key>
                                         [--description <description>] <ssh-key>
---public-key <public-key>
Filename for a public key to upload
--description <description>
SSH key description
<ssh-key>
SSH key name

Example:

# vinfra service compute key create publickey --public-key /root/.ssh/id_rsa.pub \
--description 'public key'
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| created_at  | 2019-04-25T13:41:14.241736+00:00 |
| description | public key                       |
| name        | publickey                        |
+-------------+----------------------------------+

This command creates a public SSH key publickey.

3.9.2. vinfra service compute key list

List compute SSH keys:

usage: vinfra service compute key list [--long]
--long
Enable access and listing of all fields of objects.

Example:

# vinfra service compute key list
+-----------+-------------+----------------------------------+
| name      | description | created_at                       |
+-----------+-------------+----------------------------------+
| testkey   | test key    | 2019-04-24T13:41:05.209837+00:00 |
| publickey | public key  | 2019-04-25T13:41:14.241736+00:00 |
+-----------+-------------+----------------------------------+

This command lists all SSH keys.

3.9.3. vinfra service compute key show

Display compute SSH key details:

usage: vinfra service compute key show <ssh-key>
<ssh-key>
SSH key name

Example:

# vinfra service compute key show publickey
+------------------------+-------------------------------------------------+
| Field                  | Value                                           |
+------------------------+-------------------------------------------------+
| created_at             | 2019-04-25T13:41:14.241736+00:00                |
| description            | public key                                      |
| name                   | publickey                                       |
| public_key_fingerprint | 1a:fb:de:d8:1e:0a:84:30:fc:ff:e4:fd:89:e7:96:a9 |
+------------------------+-------------------------------------------------+

This command shows the details of the SSH key publickey.

3.9.4. vinfra service compute key delete

Delete a compute SSH key:

usage: vinfra service compute key delete <ssh-key>
<ssh-key>
SSH key name

Example:

# vinfra service compute key delete publickey
Operation successful

This command deletes the SSH key publickey.