SSH keys
In this article:
SSH keys#
K2 Cloud supports SSH-key authentication. This method provides a higher level of security and, in many situations, is more convenient for accessing instances than traditional password entry.
The cloud stores the public key and allows users to store the private key on the local computer. You can also create your own key pair using any key generation tool and upload the public key to the cloud.
Note
K2 Cloud uses 2048-bit RSA keys.
Create a key#
To create a new or upload your own SSH key pair, go to the Virtual machines section Compute SSH keys, and click Create. Enter the key name and select whether to create a new key or upload your own one.
Note
SSH-key name must include only Latin letters and numbers.
You can also assign tags to an SSH key. To complete the key creation, click Create again.
Note
When creating a new key pair, the private key will be downloaded by your browser. Keep it safe.
Modifying the key#
Modify SSH key field on the Information tab of the instance page to assign a new SSH key to the instance.
Important
This operation adds a new key each time a key is changed but old key is not removed. Reboot an instance for changes to take effect.
Assigning tags#
To add, modify or delete SSH key tags:
Go to the Access and security section SSH keys.
In the resource table, select the SSH key for which tags should be edited and click Configure tags.
Open the Tags tab.
To add a tag, click Add tag and specify the Key and Value fields.
To modify a tag, edit the required fields (Value and/or Key) of the respective tag.
To delete a tag, click the icon next to the tag you no longer need.
Note
If no tags have been set earlier, you can add the Name tag by clicking Add Name tag and specifying its value.
Click Apply to save the changes.
Deleting a key#
To delete the SSH public key, go to Virtual machines Compute SSH keys and click Delete. Note that deleted SSH-keys cannot be restored.
Important
When deleting a key pair in the K2 Cloud, you delete only the public key.
You cannot start a new instance using a deleted key pair, but you can still connect to the instances you started using the deleted SSH key pair.