vinfra cluster sshkey add

Add an SSH public key from a file:

usage: vinfra cluster sshkey add <file>
<file>
SSH public key file

Example:

# vinfra cluster sshkey add id_rsa.pub
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | 100a54ce-0bf5-4bc0-8e46-2e8b952343e6 |
+---------+--------------------------------------+

This command creates a task to add a public SSH key from the file mykey.pub to the list of trusted keys.

Task outcome:

# vinfra task show 100a54ce-0bf5-4bc0-8e46-2e8b952343e6
+---------+-------------------------------------------------------+
| Field   | Value                                                 |
+---------+-------------------------------------------------------+
| args    | - admin                                               |
|         | - 1                                                   |
| kwargs  | key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA<...>         |
|         |   user@example.com                                    |
| name    | backend.presentation.nodes.ssh.tasks.CreateSshKeyTask |
| result  | id: 6a2fb834-4bc6-4597-ae74-7cacf96b7c75              |
|         | key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA<...>         |
|         |   user@example.com                                    |
|         | label: user@example.com                               |
| state   | success                                               |
| task_id | 100a54ce-0bf5-4bc0-8e46-2e8b952343e6                  |
+---------+-------------------------------------------------------+