使用厨师和刀引导一个ubuntu ec2实例

我使用chef引导了一个基于ec2 ubuntu的厨师节点,它创build了一个实例,但是它表示Failed to authenticate ubuntu - trying password auth并要求input密码。 但是新创build的ubuntu ec2实例不会有任何forms的密码设置。 抛出一个错误

 ERROR: Net::SSH::AuthenticationFailed: [email protected] 

我怎么绕过这个事件,还有什么问题,我必须做任何configuration的变化。

请帮助我,我是新来的厨师。

我的猜测是你没有使用这个

 -i IDENTITY_FILE, --identity-file IDENTITY_FILE The SSH identity file used for authentication. Key-based authentication is recommended. 

你也可以使用“ssh-agent”并在你的私钥上使用“ssh-add”让ssh知道你想使用它,而不用通过调用ssh来指定“-i”选项。