Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Managed Service for Kubernetes
    • Resolving the `Timed out waiting for the condition` error when mounting a PVC
    • Resolving the `Timed out waiting for the condition` error when mounting a volume with a large number of files
    • Hosts of the Managed Service for Kubernetes node groups stay in the `RECONCILING` status for a long time
    • Cyclical restarts of the `kube-dns-autoscaler` pod
    • Cannot reduce the number of nodes in a Managed Service for Kubernetes group
    • Cannot increase the number of nodes in a Managed Service for Kubernetes group
    • Resolving the `Multi-Attach error for volume` error
    • Resolving the `DEADLINE_EXCEEDED` error
    • Troubleshooting time synchronization issues on Managed Service for Kubernetes cluster nodes
    • Troubleshooting DNS name resolving issues in Managed Service for Kubernetes
    • Resolving the `0/10 nodes are available - node(s) had untolerated taint` error
    • The cluster remains in the `STARTING` status for too long
    • Cluster pods remain in the `PENDING` status for too long
    • Troubleshooting HPA issues in Managed Service for Kubernetes
    • Resolving the `Can't use allocation_policy.locations.subnet_id together with node_template.network_interface_specs` error
    • Troubleshooting issues when mounting volumes to Managed Service for Kubernetes cluster pods using Container Storage Interface for S3
    • Managed Service for Kubernetes cluster remains `STARTING` for too long after renaming
    • How to add and update Linux SSH keys on Managed Service for Kubernetes node group hosts
    • How to assign static external IP addresses to Managed Service for Kubernetes cluster nodes
    • How to provide Kubernetes nodes with internet access
    • How to create an internal Ingress controller
    • How to set up autodeletion of old images from Managed Service for Kubernetes nodes
    • How to find out the external IP address of a Managed Service for Kubernetes node
    • How to use Certificate Manager certificates in load balancers or in Managed Service for Kubernetes
    • How to change the time zone on Managed Service for Kubernetes cluster nodes
    • How to find out the ephemeral storage size for a Managed Service for Kubernetes node

In this article:

  • Case description
  • Solution
  1. Managed Service for Kubernetes
  2. How to add and update Linux SSH keys on Managed Service for Kubernetes node group hosts

How to add and update Linux SSH keys on Managed Service for Kubernetes node group hosts

Written by
Yandex Cloud
Updated at December 17, 2025
  • Case description
  • Solution

Case descriptionCase description

  • You need to add a new Linux user on hosts of the Managed Service for Kubernetes cluster node group.
  • Your need to update an SSH key for an existing Linux user on hosts of the Managed Service for Kubernetes cluster node group.

SolutionSolution

To add a user or update an SSH key for the current user, update the node group keys. Before running this operation, prepare a file with SSH keys for your users in the following format:

username:ssh-ed25519 AAAAB3NzaC***********zo/lP1ww== username
username2:ssh-ed25519 ONEMOREkey***********88OavEHw== username2

Then, use the YC CLI to run this command:

yc managed-kubernetes node-group add-metadata \
  --name <node_group_name> \
  --metadata-from-file ssh-keys=<path_to_file_with_public_SSH_keys>

As a result of this command, the following operations will be applied to the cluster's node group:

  • Existing users will have their SSH keys updated.
  • New users will be created with the specified SSH keys.

When updating SSH keys, the node group switches to RECONCILING as the VM instances of this group start updating their metadata.

Alert

Running a metadata update on a Managed Service for Kubernetes cluster node group may cause the affected nodes to become partially or fully unavailable for up to 20 minutes.

Was the article helpful?

Previous
Managed Service for Kubernetes cluster remains `STARTING` for too long after renaming
Next
How to assign static external IP addresses to Managed Service for Kubernetes cluster nodes
© 2025 Direct Cursus Technology L.L.C.