执行时:
knife bootstrap {{IP}} --ssh-user centos --ssh-password '' \
--sudo --use-sudo-password --node-name node1 \
--run-list 'recipe[learn_chef_httpd]'
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
ERROR: Net::SSH::AuthenticationFailed: Authentication failed for user centos@{{IP}}@{{IP}}
Run Code Online (Sandbox Code Playgroud)
我正在尝试连接到没有密码的 centos 用户,因为我想使用 SSH-Key Auth。
我试过传递一些排列:
knife bootstrap {{IP}} -x centos -i .chef/james-chef-validator.pem --sudo --run-list 'recipe[learn_chef_httpd]'
Run Code Online (Sandbox Code Playgroud)
都没有成功...
如果使用 -VV 运行:
...
DEBUG: allowed methods: publickey,gssapi-keyex,gssapi-with-mic
DEBUG: none failed
DEBUG: trying publickey
DEBUG: connecting to ssh-agent
ERROR: could not connect to ssh-agent
ERROR: all authorization methods failed (tried none, publickey)
ERROR: Net::SSH::AuthenticationFailed: Authentication failed for user centos@{{IP}}@{{IP}} …
Run Code Online (Sandbox Code Playgroud)