Search code examples
macosamazon-web-servicesamazon-emr

Error while connecting to AWS EMR cluster from mac


I'm trying to create 3 node AWS EMR cluster. I have also create a key to connect to cluster from macOS with command :

ssh -i ~/Downloads/BigdataKey.pem [email protected]

But its giving error :

192:Downloads nageshsinghchauhan$ ssh -i ~/Downloads/BigdataKey.pem [email protected]
ssh: connect to host ec2-xx-xx-xx-xx.ap-south-1.compute.amazonaws.com port 22: Operation timed out

Any one please help me out, I'm trying this for the first time using macOS.


Solution

  • The solution I found is that:

    1. Go to EC2 security groups and and open "ElasticMapReduce-master".
    2. Under Inbound tab, click edit.
    3. Add rule, and provide Type = All TCP, port range = 0-65535, source = MyIP.
    4. now go to terminal and provide permission as :chmod 400 my-key-pair.pem
    5. Last step, try SSH to your cluster via your key from mac.

    It's Done :)