我一直在尝试在我的机器上执行knife zero bootstrap
命令,但我总是收到此错误。要添加,我可以使用SSH命令直接连接到目标服务器。
ERROR: Net::SSH::Exceptionremote forwarding request failed
ERROR: /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/service/forward.rb:178:in `block in remote'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:505:in `call'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:505:in `request_failure'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:466:in `dispatch_incoming_packets'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-2.9.2/lib/net/ssh/connection/session.rb:222:in `preprocess'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/server.rb:205:in `preprocess'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/session.rb:449:in `block in preprocess'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/server_list.rb:47:in `block in each'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/server_list.rb:45:in `each'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/server_list.rb:45:in `each'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/session.rb:449:in `preprocess'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/session.rb:430:in `process'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/session.rb:417:in `block in loop'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/session.rb:417:in `loop'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/net-ssh-multi-1.2.1/lib/net/ssh/multi/session.rb:417:in `loop'
/opt/chefdk/embedded/apps/chef/lib/chef/knife/ssh.rb:280:in `ssh_command'
/home/<user>/.chefdk/gem/ruby/2.1.0/gems/knife-zero-1.3.0/lib/knife-zero/bootstrap_ssh.rb:23:in `ssh_command'
/opt/chefdk/embedded/apps/chef/lib/chef/knife/ssh.rb:526:in `run'
/opt/chefdk/embedded/apps/chef/lib/chef/knife/bootstrap.rb:333:in `run'
/opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:422:in `block in run_with_pretty_exceptions'
/opt/chefdk/embedded/apps/chef/lib/chef/local_mode.rb:39:in `with_server_connectivity'
/opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:421:in `run_with_pretty_exceptions'
/opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:214:in `run'
/opt/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:142:in `run'
/opt/chefdk/embedded/apps/chef/bin/knife:25:in `<top (required)>'
/usr/bin/knife:51:in `load'
/usr/bin/knife:51:in `<main>'
我已经在AllowTcpForwarding
文件中启用了/etc/ssh/sshd_config
并在执行命令之前终止了目标服务器上所有现有的SSH连接,但没有任何作用。
答案 0 :(得分:0)
通过将刀零升级到更新版本来管理它。 但我不明白为什么旧版本适用于其他环境。