Deleting authorized keys
Written by
Updated at November 14, 2024
Management console
CLI
API
- In the management console
, select the folder the service account belongs to. - In the list of services, select Identity and Access Management.
- In the left-hand panel, select
Service accounts and select the required service account. - Under Authorized keys, click
in the line with the key to delete, and select Delete. - In the window that opens, confirm the deletion.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
-
Get a list of authorized key IDs (
ID
) 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.