Knife bootstrap not working for version knife 15.2.20

sudo knife bootstrap -VV --bootstrap-version '14.12.9' 192.168.56.108 -U osbix -P scskcbcsk -N testnode --ssh-verify-host-key 'never' --node-ssl-verify-mode 'none'

Password:

INFO: Using configuration from /Users/moham123/.chef/knife.rb

DEBUG: Checking if we need to accept Chef license to bootstrap node

DEBUG: Reading products and relationships...

DEBUG: Successfully read products and relationships

Connecting to 192.168.56.108

WARN: [SSH] PTY requested: stderr will be merged into stdout

DEBUG: [SSH] osboxes@192.168.56.108<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>, :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>"never"}> (cmd.exe /c ver)

DEBUG: [SSH] opening connection to osboxes@192.168.56.108<{:user_known_hosts_file=>"/dev/null", :port=>22, :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>60, :auth_methods=>["none", "password", "keyboard-interactive"], :keys_only=>nil, :keys=>, :password=>"", :forward_agent=>nil, :non_interactive=>true, :verify_host_key=>"never"}>

Traceback (most recent call last):

36: from /Users/moham123/.chefdk/gem/ruby/2.5.0/bin/knife:23:in `'

35: from /Users/moham123/.chefdk/gem/ruby/2.5.0/bin/knife:23:in `load'

34: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/bin/knife:24:in `<top (required)>'

33: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/application/knife.rb:162:in `run'

32: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife.rb:222:in `run'

31: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife.rb:474:in `run_with_pretty_exceptions'

30: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/local_mode.rb:42:in `with_server_connectivity'

29: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife.rb:475:in `block in run_with_pretty_exceptions'

28: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:569:in `run'

27: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:620:in `connect!'

26: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife/bootstrap.rb:674:in `do_connect'

25: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:70:in `connect!'

24: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/chef-15.2.20/lib/chef/knife/bootstrap/train_connector.rb:57:in `connection'

23: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:82:in `connection'

22: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `create_new_connection'

21: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh.rb:238:in `new'

20: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:53:in `initialize'

19: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/extras/command_wrapper.rb:166:in `load'

18: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:116:in `platform'

17: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect.rb:9:in `scan'

16: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `scan'

15: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:27:in `each'

14: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:33:in `block in scan'

13: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `scan_children'

12: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:45:in `each'

11: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'

10: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'

9: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/specifications/os.rb:29:in `block in load'

8: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/platforms/detect/helpers/os_windows.rb:5:in `detect_windows'

7: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/plugins/base_connection.rb:128:in `run_command'

6: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:218:in `run_command_via_connection'

5: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:249:in `session'

4: from /Users/moham123/.chefdk/gem/ruby/2.5.0/gems/train-core-2.1.19/lib/train/transports/ssh_connection.rb:180:in `establish_connection'

3: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh.rb:237:in `start'

2: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh.rb:237:in `new'

1: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/transport/session.rb:81:in `initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/transport/session.rb:298:in `select_host_key_verifier': Invalid argument to :verify_host_key (or deprecated :paranoid): "never" ( ArgumentError )

Your chefdk should come with net-ssh 5.2.0 which has those changes in it. ChefDK: 4.3.13 has knife 15.2.20 and comes with net-ssh 5.2.0 https://github.com/chef/chef-dk/blob/v4.3.13/Gemfile.lock.

Perhaps try to delete /opt/chefdk and reinstall?

@ccrebolder Thank you !! :slight_smile: it worked i reinstalled chefDK