提问人:Prince kumar 提问时间:10/8/2023 最后编辑:seshadri_cPrince kumar 更新时间:10/9/2023 访问量:30
来自 Chef 服务器的引导节点失败,并出现 SSH 错误
bootstrapping node from chef server failing with SSH error
问:
我运行此命令以使用 chef 服务器引导节点,该服务器将在节点上安装 chef-client。
[root@ip-172-31-23-178 chef-repo]# knife bootstrap 172.31.20.187 --ssh-user ec2-user --sudo -i node1.key.pem -N node1
预期:连接已成功建立,并在节点上安装了 chef 客户端。
但它失败了,出现以下错误:
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.300/lib/chef/knife/bootstrap.rb:31: warning: already initialized constant Chef::Knife::Bootstrap::SUPPORTED_CONNECTION_PROTOCOLS
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.300/lib/chef/knife/bootstrap.rb:31: warning: previous definition of SUPPORTED_CONNECTION_PROTOCOLS was here
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.300/lib/chef/knife/bootstrap.rb:32: warning: already initialized constant Chef::Knife::Bootstrap::WINRM_AUTH_PROTOCOL_LIST
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.300/lib/chef/knife/bootstrap.rb:32: warning: previous definition of WINRM_AUTH_PROTOCOL_LIST was here
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.300/lib/chef/knife/bootstrap.rb:350: warning: already initialized constant Chef::Knife::Bootstrap::DEPRECATED_FLAGS
/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.0.300/lib/chef/knife/bootstrap.rb:350: warning: previous definition of DEPRECATED_FLAGS was here
WARNING: You provided --ssh-user. This flag is deprecated. Please use '--connection-user USERNAME' instead.
Node node1 exists, overwrite it? (Y/N) Y
Client node1 exists, overwrite it? (Y/N) Y
Creating new client for node1
Creating new node for node1
Connecting to 172.31.20.187
WARN: [SSH] PTY requested: stderr will be merged into stdout
The authenticity of host '172.31.20.187 ()' can't be established.
fingerprint is SHA256:D8xTTFWkuLv3KUaJWCRjzzAl5Li2XJRlKsaQGux/jWA.
Are you sure you want to continue connecting
? (Y/N) Y
WARN: [SSH] PTY requested: stderr will be merged into stdout
WARN: [SSH] connection failed, terminating (#<Net::SSH::AuthenticationFailed: Authentication failed for user [email protected]>)
ERROR: Train::Transports::SSHFailed: SSH session could not be established
[root@ip-172-31-23-178 chef-repo]#
答: 暂无答案
评论
Authentication failed for user ec2-user
Please use '--connection-user USERNAME'
knife bootstrap