Hadoop 无法ssh到弹性MapReduce

Hadoop 无法ssh到弹性MapReduce,hadoop,amazon-web-services,ssh,amazon-ec2,elastic-map-reduce,Hadoop,Amazon Web Services,Ssh,Amazon Ec2,Elastic Map Reduce,我正在使用elasticmapreduce从命令行旋转新集群。阅读教程后,我有: elastic-mapreduce --create --alive \ --instance-type m1.xlarge\ --num-instances 5 \ --supported-product mapr \ --name m7 \ --args "--edition,m7" 将创建一个包含6个节点(1个主节点+5个从节点)的新集群。因此,我尝试ssh进入主机: elastic-mapreduce -

我正在使用
elasticmapreduce
从命令行旋转新集群。阅读教程后,我有:

elastic-mapreduce --create --alive \
--instance-type m1.xlarge\
--num-instances 5 \
--supported-product mapr \
--name m7 \
--args "--edition,m7"
将创建一个包含6个节点(1个主节点+5个从节点)的新集群。因此,我尝试
ssh
进入主机:

elastic-mapreduce --jobflow j-3FLVMX9CYE5L6 --ssh
我得到了
拒绝许可(公钥)
permissions.json
文件位于
elastic\u mapreduce
主页中,也是
my\u key.pem
文件的路径。 此外,通过这样做:

ssh -i my_key.pem hadoop@masternode
我还获得了被拒绝的
权限(公钥)
。my_key.pem已被授予
400
权限。我真的不知道下一步我能做什么。。。有什么线索吗

当我转到
EC2
控制台,并单击
Connect
时,我收到以下错误消息:

Instance is not associated with a key pair.
This instance is not associated with a Key Pair. Without a Key Pair you will need to log into this instance using a valid username and password combination.

创建EMR群集时,请确保启用密钥对。在EMR控制台上,您可以看到如下所示:

以补充上文的评论;我想补充一点,在创建集群时,您可以在命令行上按下键:例如:

elastic-mapreduce --create --alive \
--instance-type m1.xlarge\
--num-instances 5 \
--supported-product mapr \
--name m7 \
--args "--edition,m7"
--key-pair hadoopKey
WARE“hadoopKey”是通过AWS控制台创建的密钥对的名称

当您使用SSH连接时,您将提供此密钥作为“标识”——这意味着主机服务器必须具有私钥(本例中为PEM文件)。此操作参数(或上面Rico的示例)将把该密钥文件推送到(且仅限于)主EC2服务器上

注意,如果您想要从主节点到其中一个Worker-boxen进行SSH,则需要将相同的PEM文件推送到主节点,然后像往常一样从那里继续

例如:

you@devbox:$scp-i hadoopKey.pem hadoopKey.pemhadoop@ec2-主服务器:
you@devbox:$ssh-i hadoopKey.pemhadoop@ec2-主服务器:
you@devbox:$ scp -i hadoopKey.pem hadoopKey.pem hadoop@ec2-the-master-server:
you@devbox:$ssh -i hadoopKey.pem hadoop@ec2-the-master-server:
<figure out the IP of a worker from w/in that Master
hadoop@ec2-the-master-server:$ ssh -i ~/hadoopKey.pem hadoop@the.worker.box.ip