plugins/kernel_v2/config/ssh_connect.rb in vagrant-unbundled-2.1.2.0 vs plugins/kernel_v2/config/ssh_connect.rb in vagrant-unbundled-2.1.4.0

- old
+ new

@@ -36,11 +36,11 @@ @username = nil if @username == UNSET_VALUE @password = nil if @password == UNSET_VALUE @insert_key = true if @insert_key == UNSET_VALUE @keys_only = true if @keys_only == UNSET_VALUE @paranoid = false if @paranoid == UNSET_VALUE - @verify_host_key = false if @verify_host_key == UNSET_VALUE + @verify_host_key = :never if @verify_host_key == UNSET_VALUE @compression = true if @compression == UNSET_VALUE @dsa_authentication = true if @dsa_authentication == UNSET_VALUE @extra_args = nil if @extra_args == UNSET_VALUE if @private_key_path && !@private_key_path.is_a?(Array) @@ -49,9 +49,21 @@ if @paranoid @verify_host_key = @paranoid end + # Values for verify_host_key changed in 5.0.0 of net-ssh. If old value + # detected, update with new value + case @verify_host_key + when true + @verify_host_key = :accepts_new_or_local_tunnel + when false + @verify_host_key = :never + when :very + @verify_host_key = :accept_new + when :secure + @verify_host_key = :always + end end # NOTE: This is _not_ a valid config validation method, since it # returns an _array_ of strings rather than a Hash. This is meant to # be used with a subclass that handles this.