Connecting to cluster nodes through SSH
    • PDF

    Connecting to cluster nodes through SSH

    • PDF

    Article Summary

    Available in Classic

    You can submit management tasks or applications through NAVER Cloud Platform's Cloud Hadoop console or Web UI (Ambari, Hue, etc.). However, SSH connection to the cluster node is required for executing the client directly.

    Note

    If you access SSH through Public domain or public IP of cluster, you can access the edge node of the cluster. Other nodes can be accessed from the edge node through SSH. See 2. Connect to cluster node.

    Preparations

    In order to access a cluster node, the following preparations need to be made.

    ItemDescriptionGuide
    Set ACGAdd the IP and Port 22 of equipment to access ACG settings of the relevant cluster
  • Access source: fixed IP of user (You can enter it by clicking the [myIp] button)
  • Firewall settings (ACG)
    Authentication keyPrivate key (.pem) required for access to the clusterManaging authentication key for direct cluster connection
    Public domainPublic domain address needed for accessing the relevant cluster node
    Can be viewed from the Public domain item from the cluster details
    Check cluster details
    Public IPPublic IP required for access to the cluster node
    Can be viewed from the Public IP item from the cluster details
    Check cluster details

    Add the public IP to ACG

    The following describes how to add a fixed IP to the cluster's ACG.

    1. From the NAVER Cloud Platform console, click the Services > Compute > Server > ACG menus, in that order.
    2. Select the ACG of the cluster you want to access, and click the [ACG settings] button.
    3. Enter the following four items and add an ACG Rule.
      • Protocol: TCP
      • Access source: IP of the local equipment used for SSH communication
      • Allowed port: 22
      • Note (Optional)
        chadoop-2-1-117_en.png

    SSH connection in the mac OS

    It describes the access method using iTerm2. Even if other programs are used, the same action generates the same outcome.

    chmod 400 </path/to/pem-key>
    ssh -i </path/to/pem-key>  sshuser@<cluster-domain>
    

    SSH connection in Windows

    It describes the access method using the PuTTY client. Even if other programs are used, the same action generates the same outcome.

    Proceed with the following steps in order.

    1. Authentication key (.pem) conversion

    PuTTY doesn't natively support the private key format (.pem) generated by Cloud Hadoop. You can use the PuTTYgen application provided by PuTTY to convert the authentication key into the format (.ppk) used by PuTTY. The private key must be converted to this format (.ppk) before PuTTY can be used to connect to the master node.

    1. Run PuTTYgen. ([Download puttygen](https://www.chiark.greenend.org.uk/ ~ sgtatham/putty/latest.html){target="_blank"})
    2. Select RSA in Type of key to generate and click the [Load] button.
    3. Select the authentication key (*.pem), and then click the [Open] button.
      • To find a file in the PEM format, select the option to display all file types.
      • The PEM file is the file name of the authentication key that is currently applied to the cluster. This PEM file must be stored on the user's local PC.
      • If the PEM file is missing, the authentication key for connection can be changed from the Console > Manage server access > Manage authentication key for direct cluster connection menu. (See Managing authentication key for direct cluster connection)
    4. Check the details in the completion confirmation popup window, and then click the [OK] button.
    5. Click [Save private key] and save it as a file of .ppk format available in PuTTY.
      • If PuTTYgen displays a warning message about saving a key without a password, then select the [Yes] button.
      • Save it with the same name as the previously generated authentication key. PuTTY automatically adds the .ppk file extension.

    2. Connect to cluster node

    1. Run PuTTY. (Download PuTTY)
    2. Select Session from the Category window and enter info in each of the settings fields as follows:
      • Host Name (or IP address): sshuser@DNS (enter the public domain or the public IP of the relevant cluster into DNS of sshuser@DNS)
      • Port: 22
    3. In the Category window, select Connection > SSH to expand, and then click the Auth item.
    4. Click the [Browse] button to select the PPK file created by converting the PEM file, and then click the [Open] button.
    5. Check if the connection to the edge node has been established successfully as follows:
      chadoop-2-1-116_en.png
    Note

    You can check the private IP and host name of each node in the Ambari UI > Hosts menu. For instructions on accessing the Ambari UI, see the Ambari UI guide.

    • Connect to the edge node and enter ssh {master node host name} or ssh {master node Private IP} to access the master node (for example, m-001, m-002).

      chadoop-2-1-node.png

    • Data nodes (for example, dn-001, dn-002) can also be accessed in the same way as the master node. Connect to the edge node and connect ssh {data node host name} or ssh {data node Private IP}.

      chadoop-2-1-node2.png


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.