我正在使用以下命令创build一个新的EC2实例:
knife ec2 server create -I ami-f0b11187 --ssh-key "mykeyid" -f t2.micro --ssh-user ubuntu --identity-file ~/.ssh/mykey.pem -z --no-host-key-verify --server-connect-attribute public_ip_address Instance ID: i-3675f897 Flavor: t2.micro Image: ami-f0b11187 Region: eu-west-1 Availability Zone: eu-west-1b Security Groups: default Tags: Name: i-3675f897 SSH Key: mykeyid Waiting for EC2 to create the instance...... Public DNS Name: ec2-52-19-107-179.eu-west-1.compute.amazonaws.com Public IP Address: 52.19.107.179 Private DNS Name: ip-172-31-41-56.eu-west-1.compute.internal Private IP Address: 172.31.41.56 Waiting for sshd access to become available..done Doing old-style registration with the validation key at ... Delete your validation key in order to use your user credentials instead Connecting to 52.19.107.179 ERROR: TypeError: no implicit conversion of nil into String
任何线索为什么最后一行可能会发生? 这个实例已经创build了,现在我可以ssh了,但是knife ec2进程在这里中止,我必须单独执行引导操作。 我真的想把这个归结为一个命令!
未configuration的刀可能是这种行为的原因。
我会build议运行
knife configure
您还需要准备好一些您可以轻松创build的证书文件
openssl genrsa -des3 -out private.pem 2048