Help Center> Elastic Cloud Server> Getting Started> Example 2: Purchasing and Logging In to a Linux ECS
None

Purchasing and Logging In to a Linux ECS

  • An Elastic Cloud Server (ECS) is a cloud server consisting of vCPUs, memory, image, and Elastic Volume Service (EVS) disks that allow on-demand allocation and elastic scaling. ECSs integrate Virtual Private Cloud (VPC), virtual firewalls, and multi-data-copy capabilities to create an efficient, reliable, and secure computing environment. This ensures stable and uninterrupted operation of services.

  • This guide provides information about how to rapidly purchase and log in to a key-pair-authenticated Linux ECS.

Step 1: Prepare for the Environment and Purchase an ECS

Log in to the ECS console and buy an ECS.

Buy an ECS.

Apply for a VPC.

View Image

Step 2.1: Configure ECS Specifications

Set Billing Mode and Type.

In this example, the billing mode is Pay-per-use, and the ECS type is General computing. This type of ECS provides a balance of computing, storage, and network resources and applies to most application scenarios.

Note

To learn more about ECS specifications, such as ECS types, application scenarios, and notes, click here.

1

Select a billing mode.

Select the charging mode.

2

Configure specifications.

View Image

Step 2.2: Select an Image and Add Disks

Set Image and Disk.

1. An image is an ECS template that contains an OS and applications. In this example, a Linux public image is selected, which is provided by HUAWEI CLOUD by default.

2. Retain the default value for the system disk. Click Add Data Disk to add a 100 GB high I/O data disk.

Note

  • Select Encryption for the disk to improve disk data security. If the image is not encrypted, the system disk is not encrypted and Unencrypted is displayed on the page for the disk. To obtain more information about disk encryption, click here.
  • You can select Share for your disk. Then, your disk can be attached to multiple ECSs. To obtain more information about shareable disks, click here.

1

Select an image.

Obtain the instance's connection address.

2

Add a disk.

Download and install a client.

View Image

Step 2.3: Configure Network

1. If you do not have a VPC configured when creating your first ECS, the system automatically creates a default VPC and security group. For more details, click here.

2. If you need to access the Internet, bind an EIP to your ECS. Click Automatically assign. The system automatically assigns an EIP to your ECS.

Note

If you need to log in to the Linux ECS using an SSH key, you must bind an EIP to the ECS.

1

Configure the network.

Apply for a VPC.

2

Use default security group rules.

Apply for an ECS.

3

Assign an EIP.

Apply for an ECS.

View Image

Step 3: Select a Login Mode

After creating the ECS, log in to it using a key pair or password.

In this example, a key pair is used for authentication.

1. Select Key pair for Login Mode and click Create Key Pair in the Key Pair field.

2. On the displayed page, click Create Key Pair, specify the required parameters, and click OK.

3. Return to the Buy ECS page and select a key pair from the Key Pair drop-down list.

Note

Securely keep the downloaded private key file, which will be used in ECS logins, OS reinstallation, or OS changing.

1

Select a login mode.

Select the charging mode.

2

Create a key pair.

3

Select a key pair.

View Image

Step 4: Confirm the Configuration and Submit the Order

Confirm the configurations, agree to the service agreement, and click Submit.
The system automatically creates the ECS for you. It takes several minutes to complete the creation.

Confirm the configuration and submit the order.

Apply for a VPC.

View Image

Step 5: (Optional) Convert Private Key File in .ppk Format

When you use PuTTY to log in to your ECS, your private key file must be in .ppk format. However, the private key file of a key pair created on HUAWEI CLOUD is in .pem format by default. Therefore, before using PuTTY for login, perform the following operations:

1. Run PuTTYgen.

To download PuTTYgen and PuTTY, click here.

2. Click Load and import the private key file.

Ensure that the format of All files (*.*) is selected.

3. Click Save private key.

Save the converted private key file, for example, kp-123.ppk, to the local computer.

Convert private key file in .ppk format.

Select the charging mode.

View Image

Step 6: Start PuTTY and Use It to Log In to the ECS

1. Double-click EXE.

2. Choose Connection > Data. Enter image username root in Auto-login username.

3. Choose Connection > SSH > Auth. In the last configuration item Private key file for authentication, click Browse and select the private key file in .ppk format.

4. Click Session and enter the EIP bound to the ECS under Host Name (or IP address).

5. Click Open to log in to the ECS.

Start PuTTY and use it to log in to the ECS.

Obtain the instance's connection address.

View Image