• Bare Metal Server

bms
  1. Help Center
  2. Bare Metal Server
  3. User Guide
  4. Getting Started
  5. Logging In to a Linux BMS
  6. Login Using an SSH Key

Login Using an SSH Key

Prerequisites

  • An EIP has been bound to the BMS.
  • You have obtained the private key for logging in to the BMS and stored the key in a local directory.
  • You have configured the inbound rules of the security group. For details, see Configuring the Security Group.
  • The network connection between the login tool (PuTTY) and the target BMS is normal. For example, the default port 22 is not blocked by the firewall.

Logging In to the Linux BMS from a Windows Computer

To log in to the Linux BMS from a Windows computer, perform the operations described in this section.

The following procedure describes how to log in to a Linux BMS using PuTTY. Before logging in to the BMS using PuTTY, make sure that the private key file has been converted to .ppk format.

  1. Check whether the private key file has been converted to .ppk format.
    • If yes, go to step 7.
    • If no, go to step 2.
  2. Visit the following website and download PuTTY and PuTTYgen:

    http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    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 PuTTY.

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

    Ensure that the private key file is in the format of All files (*.*).

  5. Click Save private key.
  6. Save the converted private key to the local computer. for example, kp-123.ppk, to the local computer.
  7. Double-click PUTTY.EXE. The PuTTY Configuration page is displayed.
    Figure 1 PuTTY Configuration
  8. Choose Connection > Data. Enter the image username in Auto-login username.
  9. Choose Connection > SSH > Auth. In the last configuration item Private key file for authentication, click Browse and select the private key converted in step 6.
  10. Click Session and enter the EIP of the BMS in the box under Host Name (or IP address).
  11. Click Open.

    Log in to a BMS.

Logging In to the Linux BMS from a Linux Computer

To log in to the Linux BMS from a Linux computer, perform the operations described in this section. The following procedure uses private key file KeyPair-ee55 as an example to describe how to log in to the BMS. The name of your private key file may be different.
  1. On the Linux CLI, run the following command to change operation permissions:

    chmod 600 /path/KeyPair-ee55

    NOTE:

    In the preceding command, path refers to the path under which the key file is stored.

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

    ssh -i /path/KeyPair-ee55 xxx@ EIP of the BMS

    NOTE:
    • In the preceding command, path refers to the path under which the key file is stored.
    • xxx is automatically created during BMS provisioning. If the BMS runs Red Hat, the username is rhel.