Upload pem file to master node and SSH to master
scp -i admin-key.pem admin-key.pem ec2-user@ecIP.eu-west-1.compute.amazonaws.com:~/ aws emr ssh --cluster-id JOB_ID
Configure passwordless SSH from master to slaves
# Identify IPs of slave nodes, hdfs dfsadmin -report | grep ^Name | cut -f2 -d:| cut -f2 -d' ' ssh-agent bash ssh-add YOUR_AWS_IAM.pem ssh-keygen [enter enter] ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop@IP_OF_SLAVE