Help Center/ SAP Cloud/ SAP HANA User Guide (Single Node)/ Appendix/ Logging In to a Linux ECS Using an SSH Key
Updated on 2022-03-04 GMT+08:00

Logging In to a Linux ECS Using an SSH Key

Prerequisites

  • You have obtained the key file of the ECS. For details about how to obtain the key file, see Obtaining the Key File of an ECS.
  • An elastic IP address has been bound to the ECS.
  • You have configured the inbound rules of the security group.

Logging In to the Linux ECS from a Windows Computer

This section describes how to log in to the Linux ECS from a Windows computer.

The following operations use PuTTY as an example to log in to the ECS. Before the login, you must convert the private key format.
  1. Visit the following website and download PuTTY and PuTTYgen:

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

    PuTTYgen is a private key generator, which is used to create an SSH key pair that consists of a public key and a private key for PuTTY.

  2. Run PuTTYgen.
  3. In the Actions area, click Load and import the private key file stored during HANA ECS creation.

    The file to be imported must be in the format of "All files (*.*)".

  4. Click Save private key.
  5. Save the converted private key to the local computer. For example, kp-123.ppk.
  6. Run PuTTY.
  7. Choose Connection > data and enter :root in Auto-login username.
  8. Choose Connection > SSH > Auth. In the last configuration item Private key file for authentication, click Browse and select the private key converted in step 5.
  9. Click Session and enter the elastic IP address of the ECS under Host Name (or IP address).
  10. Click Open.

    The ECS is logged in.

Logging In to the Linux ECS from a Linux Computer

This section describes how to log in to the Linux ECS from a Linux computer. The following operations use private key file kp-123.pem as an example to log in to the ECS.
  1. On the Linux CLI, run the following command to change the permission:

    chmod 600 /path/kp-123

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

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

    ssh -i /path/kp-123 root@Elastic IP address

    • In the preceding command, path specifies where the private key file is saved.
    • Elastic IP address is the elastic IP address bound to the ECS.