Create an SSH key
Describes how to create an SSH key in the KSV web console.
This topic describes how to create an SSH key in the KubeSphere Virtualization (KSV) web console.
A public key and a private key constitute an SSH key pair. A public key is used to encrypt sessions and verify digital signatures, and its paired private key is used to decrypt the session data. This secures data transmission. After an SSH key is created, the system automatically downloads the private key to your local environment. We recommend that you keep it properly. If you associate an SSH key with a VM, you cannot log in to the VM without the private key.
Prerequisites
The user that you use has been granted permissions to create SSH keys. Only user admin, project administrators, and project operators have permissions to create SSH keys.
Procedure
Log in to the KSV web console.
In the top navigation bar, click Virtual Resources to go to the management page of virtual resources.
In the left-side navigation pane, click SSH to go to the SSH Keys page.
On the SSH Keys page, click Create in the upper-right corner.
In the dialog box that appears, configure parameters for the SSH key. The following table describes the parameters.
Parameter Description Select MethodYou can select one of the methods to create a key pair. We recommend that you select Create New Key Pair and keep the generated private key properly.- Create New Key Pair: creates a new SSH key. After an SSH key is created, the system automatically downloads the private key to your local environment. This is the only chance you can download the private key. We recommend that you keep it properly.
- Use Existing Public Key: imports a Base64-encoded public key on your own.
NameThe name of the SSH key.The name can contain only lowercase letters, digits, and hyphens (-), and must start and end with a lowercase letter or a digit. The name can contain up to 16 characters in length.AliasThe alias of the SSH key.The alias can contain any characters and be up to 16 characters in length.Public KeyEnter the public key that is used to generate the private key. This parameter is available only when Select Method is set to Use Existing Public Key.DescriptionThe description of the SSH key.The description can be up to 128 characters in length. The character types are unlimited.Click OK. The SSH key appears in the SSH key list after it is created.
What to do next
After an SSH key is created, you can associate the key with a VM for SSH login. For more information, see Create a VM.