AWS Elastic Beanstalk CLI不会提示创建新密钥对

时间:2015-07-09 10:17:30

标签: python amazon-web-services ssh elastic-beanstalk amazon-elastic-beanstalk

我正在关注此AWS教程,以在Amazon Elastic Beanstalk上部署python应用程序:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-common-steps.html#python-common-configuring

我按照指南一直到EB Cli应该提示我创建一个密钥对。但我得到的只是输入密钥对名称的提示。

Do you want to set up SSH for your instances?
(y/n): y

Type a keypair name.
(Default is aws-eb):
You must specify a key type (-t).
Usage: ssh-keygen [options]
Options:
  -b bits     Number of bits in the key to create.
  -c          Change comment in private and public key files.
  -e          Convert OpenSSH to IETF SECSH key file.
  -f filename Filename of the key file.
  -g          Use generic DNS resource record format.
  -i          Convert IETF SECSH to OpenSSH key file.
  -l          Show fingerprint of key file.
  -p          Change passphrase of private key file.
  -q          Quiet.
  -y          Read private key file and print public key.
  -t type     Specify type of key to create.
  -B          Show bubblebabble digest of key file.
  -C comment  Provide new comment.
  -N phrase   Provide new passphrase.
  -P phrase   Provide old passphrase.
  -r hostname Print DNS resource record.
  -G file     Generate candidates for DH-GEX moduli
  -T file     Screen candidates for DH-GEX moduli
ERROR: The EB CLI cannot find your SSH key file for keyname "aws-eb". Your SSH key file must be located in the .ssh fold
er in your home directory.

我也试过

eb init --interactive

但结果仍然相同。

我也在这里挖掘EB CLI文档:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html

我应该得到的结果是这样的:

Select a keypair.
1) [ Create new KeyPair ]
(default is 1): 1

我在使用Powershell的Windows 8.1上。

我的Eb Cli版本是: EB CLI 3.4.5(Python 2.7.1)

到目前为止,我已经安装了OpenSSH以及您在AWS教程(上面的链接)中看到的所有内容。

我会提供尽可能多的信息。请随意询问。

我已经坚持了一段时间尝试了很多选择。

感谢任何帮助。

谢谢!

1 个答案:

答案 0 :(得分:7)

通过使用EC2控制台手动创建密钥对来解决问题。

以下是对那些感兴趣的人如何做到这一点: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#having-ec2-create-your-key-pair

感谢SonarJetLens的指导。 :)