2 To establish a connection to the master node type the following command

2 to establish a connection to the master node type

This preview shows page 322 - 324 out of 395 pages.

2. To establish a connection to the master node, type the following command. Replace ec2-###- ##-##-###.compute-1.amazonaws.com with the master public DNS name of your cluster and replace ~/mykeypair.pem with the location and file name of your .pem file. ssh [email protected] ec2-###-##-##-###.compute-1.amazonaws.com -i ~/mykeypair.pem Important You must use the login name hadoop when you connect to the Amazon EMR master node; otherwise, you may see an error similar to Server refused our key . 3. A warning states that the authenticity of the host you are connecting to cannot be verified. Type yes to continue. 4. When you are done working on the master node, type the following command to close the SSH connection. exit Connect to the Master Node Using the AWS CLI You can create an SSH connection with the master node using the AWS CLI on Windows and on Linux, Unix, and Mac OS X. Regardless of the platform, you need the public DNS name of the master node and your Amazon EC2 key pair private key. If you are using the AWS CLI on Linux, Unix, or Mac OS X, you must also set permissions on the private key ( .pem or .ppk ) file as shown in To configure the key pair private key file permissions (p. 316) . To connect to the master node using the AWS CLI 1. To retrieve the cluster identifier, type: aws emr list-clusters The output lists your clusters including the cluster IDs. Note the cluster ID for the cluster to which you are connecting. 316
Image of page 322
Amazon EMR Management Guide Connect to the Master Node Using SSH "Status": { "Timeline": { "ReadyDateTime": 1408040782.374, "CreationDateTime": 1408040501.213 }, "State": "WAITING", "StateChangeReason": { "Message": "Waiting after step completed" } }, "NormalizedInstanceHours": 4, "Id": "j-2AL4XXXXXX5T9" , "Name": "AWS CLI cluster" 2. Type the following command to open an SSH connection to the master node. In the following example, replace j-2AL4XXXXXX5T9 with the cluster ID and replace ~/mykeypair.key with the location and file name of your .pem file (for Linux, Unix, and Mac OS X) or .ppk file (for Windows). aws emr ssh --cluster-id j-2AL4XXXXXX5T9 --key-pair-file ~/mykeypair.key 3. When you are done working on the master node, close the AWS CLI window. For more information, see Amazon EMR commands in the AWS CLI . Connect to the Master Node Using SSH on Windows Windows users can use an SSH client such as PuTTY to connect to the master node. Before connecting to the Amazon EMR master node, you should download and install PuTTY and PuTTYgen. You can download these tools from the PuTTY download page . PuTTY does not natively support the key pair private key file format ( .pem ) generated by Amazon EC2. You use PuTTYgen to convert your key file to the required PuTTY format ( .ppk ). You must convert your key into this format ( .ppk ) before attempting to connect to the master node using PuTTY. For more information about converting your key, see Converting Your Private Key Using PuTTYgen in the Amazon EC2 User Guide for Linux Instances .
Image of page 323
Image of page 324

You've reached the end of your free preview.

Want to read all 395 pages?

  • Spring '12
  • LauraParker
  • Amazon Web Services, Amazon Elastic Compute Cloud

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes