No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FusionCloud 6.3.1 Management Plane Hybrid Cloud Guide 05

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Logging In to Linux HUAWEI CLOUD ECSs Using an SSH Key

Logging In to Linux HUAWEI CLOUD ECSs Using an SSH Key

If your ECS uses the key pair authentication mode, you can log in to the ECS using SSH.

Prerequisites

  • You have obtained the private key file used during ECS application.
  • You have bound a public EIP to the ECS. If you do not bind a public EIP to the ECS, bind one by following the instructions provided in Binding a HUAWEI CLOUD EIP to a HUAWEI CLOUD ECS.
  • You have configured the inbound rules of the security group to allow your local computer to access the ECS SSH port. For details, see Creating a Security Group.
  • The network connection between the login tool (PuTTY) and the target ECS is normal.

Procedure

Logging in to the Linux ECS from a Windows computer

To log in to the Linux ECS from a Windows computer, perform the following operations:

Before logging in to the ECS using PuTTY, make sure that the private key file has been converted in .ppk format.

  1. Check whether the private key file has been converted to .ppk format.

  2. Check whether PuTTY and PuTTYgen have been installed.

    • If yes, go to Step 3.
    • If no, download PuTTY and PuTTYgen and install them.
    NOTE:

    PuTTYgen is a private key generator, which is used to create a key pair that consists of a public key and a private key for login authentication.

  3. Run PuTTYgen.
  4. In the Actions area, click Load and import the private key file that you stored when creating the ECS.

    Set the file type to All files (*.*) when importing the private key file.

    Figure 4-10 File type

  5. Click Save private key. Save the converted private key, for example, kp-123.ppk, to the local computer.
  6. Double-click PUTTY.EXE. The PuTTY Configuration dialog box is displayed.

    Figure 4-11 PuTTY Configuration

  7. Choose Connection > Data and enter root in Auto-login username.
  8. Choose Connection > SSH > Auth. In configuration item Private key file for authentication, click Browse and select the private key file or the private key converted in Step 5.
  9. Click Session and enter the public EIP of the ECS under Host Name (or IP address).
  10. Click Open.

    Log in to the ECS.

  11. Initialize the data disk for the HUAWEI CLOUD ECS.

    If a data disk has been added to the HUAWEI CLOUD ECS, you must initialize the data disk before using it. For details, see Initializing the Data Disk (in the Linux OS).

Logging in to the Linux ECS from a Linux computer

To log in to the Linux ECS from a Linux computer, perform the following operations. This section uses the private key file kp-123.pem as an example.

  1. Run the following command to change operation permission for the private key file to read-only:

    chmod 400 /path/kp-123

    NOTE:

    In the preceding command, path indicates the path where the key file is saved.

  2. Run the following command to log in to the ECS:

    ssh -i /path/kp-123 Default username@EIP

    For example, if the default username is linux, run the following command:

    ssh -i /path/kp-123 linux@EIP

    NOTE:
    • In the preceding command, path indicates the path where the key file is saved.
    • EIP is the public EIP bound to the ECS.

  3. Initialize the data disk for the HUAWEI CLOUD ECS.

    If a data disk has been added to the HUAWEI CLOUD ECS, you must initialize the data disk before using it. For details, see Initializing the Data Disk (in the Linux OS).

Translation
Download
Updated: 2019-01-17

Document ID: EDOC1100043116

Views: 33071

Downloads: 20

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next