Using the account password to log in to the virtual machine is a relatively weak authentication method. There is a risk of brute force attack, and security cannot be guaranteed. The key pair is a safe and convenient login authentication method. The SCP platform provides the virtual machine key pair management. Users can log in to the virtual machine remotely through the private key.
After the SCP platform creates a key pair, it will generate a public key and a private key. When binding the key pair to the virtual machine, the public key will be pushed down to the virtual machine. Users can securely log in to the virtual machine via SSH using the private key.
Precautions:
The key pair management only supports the SSH protocol of the Linux operating system and is only valid for the root user.
The key pair is downloaded to the local PC through the browser only when it is created. The key pair will not be saved on the SCP platform and cannot be downloaded later. Be sure to download the private key after creation and save it properly.
The key pair can be unbound on the virtual machine management interface if the private key is lost.
After binding the key pair to the virtual machine, it can no longer log in to the virtual machine with the username/password using SSH.
Steps
Step 1.Log in to the SCP platform, and navigate to Resources > Management > Security. On the Security page, click Key Pairs and click Create Key Pair to create key pair.
Step 2.Select Auto-Create. Please note that after the key pair creation is complete, download the private key and save it. Unfortunately, the SCP platform does not save the private key, and you cannot download the private key again. Or select Import to import the existing public key to the SCP platform for use.
Step 3.After creating a new key pair, locate the specific virtual machine that needs to be bound, clicks More, and select Bind Key Pair to bind the key pair.