Help Center/ Data Encryption Workshop/ Getting Started/ Logging In to a Linux ECS Using a Private Key
Updated on 2024-11-29 GMT+08:00

Logging In to a Linux ECS Using a Private Key

  • DEW is a cloud data encryption service. The Key Pair Service (KPS) provided by DEW is a secure, reliable, and easy-to-use key pair management service. As an alternative to the traditional username+password authentication method, key pairs allow you to remotely log in to Linux ECSs.
  • A key pair, including one public key and one private key, are generated based on a cryptographic algorithm. The public key is automatically saved in Huawei Cloud, while the private key can be saved to your local host. You can also save your private keys in Huawei Cloud and have them managed by KPS.
  • The following shows how to use a created key pair to log in to a Linux ECS, helping you understand KPS better.

Step 1 Preparing the Environment

  1. Log in to the management console.
  2. In the navigation pane on the left, choose Compute > Elastic Cloud Server. On the displayed page, create an ECS to bind a key pair.

Step 2 Creating a Key Pair

  1. Log in to the management console and choose Security > Data Encryption Workshop from the left.
  2. In the navigation pane on the left, choose Key Pair Service. On the displayed page, click Create Key Pair.
    • You can choose whether to host your private keys on Huawei Cloud as needed.
    • To ensure ECS security, private keys that are not managed by Huawei Cloud can be downloaded only once. Keep your downloaded private keys properly. Private keys that are managed by Huawei Cloud can be exported anytime you need.

Step 3 Binding a Key Pair

  1. On the Key Pair Service page, click the ECS List tab.
  2. Locate the target ECS in the list and click Bind in the Operation column. In the displayed Bind Key Pair dialog box, configure the parameters, and click OK.
    • If you have the root password of the ECS, directly enter the password to bind the key pair to the ECS.
    • If you do not have the root password of the ECS, shut down ECS, wait until it is stopped, and then bind the key pair to the ECS.

Step 4 Logging In to an ECS Using a Private Key

  1. Open PuTTY.
    Figure 1 IP address of the ECS
  2. Enter the username of the ECS image.
    Figure 2 Username
  3. Upload the .ppk private key file.
    Figure 3 Uploading the private key file
  4. Enter the elastic IP address of the ECS.
    Figure 4 Uploading the private key file
    • If the public image is a CoreOS image, the username is core. In other occasions, the username is root.
    • The private key file to be uploaded must be a .ppk file.