Deleting authorized keys
Written by
Updated at August 28, 2024
Management console
CLI
API
- In the management console
, select the folder the service account belongs to. - At the top of the screen, go to the Service accounts tab.
- Choose a service account and click the row with its name.
- Under Authorized keys, click
next to the key to be deleted and select Delete. - In the window that opens, click Delete.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
-
Get a list of authorized key
IDs
for a specific service account. Specify the service account name in the--service-account-name
parameter:yc iam key list --service-account-name <service_account_name>
Result:
+----------------------+-------------------------------------+-----------+---------------------+ | ID | SUBJECT | ALGORITHM | CREATED AT | +----------------------+-------------------------------------+-----------+---------------------+ | ajeave7oktut******** | serviceAccount:ajeedllrkjma******** | RSA_2048 | 2022-03-13 20:14:22 | | ajeb794igb80******** | serviceAccount:ajeedllrkjma******** | RSA_2048 | 2022-03-13 20:06:13 | +----------------------+-------------------------------------+-----------+---------------------+
-
Delete the old authorized key. Instead of
<ID>
, specify the authorized key ID:yc iam key delete <ID>
To delete an authorized key, use the delete REST API method for the Key resource or the KeyService/Delete gRPC API call.