lib/net/ssh.rb in net-ssh-5.1.0 vs lib/net/ssh.rb in net-ssh-5.2.0.rc1
- old
+ new
@@ -71,11 +71,11 @@
known_hosts global_known_hosts_file user_known_hosts_file host_key_alias
host_name user properties passphrase keys_only max_pkt_size
max_win_size send_env use_agent number_of_password_prompts
append_all_supported_algorithms non_interactive password_prompt
agent_socket_factory minimum_dh_bits verify_host_key
- fingerprint_hash
+ fingerprint_hash check_host_ip
]
# The standard means of starting a new SSH connection. When used with a
# block, the connection will be closed when the block terminates, otherwise
# the connection will just be returned. The yielded (or returned) value
@@ -106,10 +106,12 @@
#
# * :auth_methods => an array of authentication methods to try
# * :bind_address => the IP address on the connecting machine to use in
# establishing connection. (:bind_address is discarded if :proxy
# is set.)
+ # * :check_host_ip => Also ckeck IP address when connecting to remote host.
+ # Defaults to +true+.
# * :compression => the compression algorithm to use, or +true+ to use
# whatever is supported.
# * :compression_level => the compression level to use when sending data
# * :config => set to +true+ to load the default OpenSSH config files
# (~/.ssh/config, /etc/ssh_config), or to +false+ to not load them, or to
@@ -288,9 +290,11 @@
options[:password_prompt] ||= Prompt.default(options)
%i[password passphrase].each do |key|
options.delete(key) if options.key?(key) && options[key].nil?
end
+
+ options[:check_host_ip] = true unless options.key?(:check_host_ip)
end
def self._sanitize_options(options)
invalid_option_values = [nil,[nil]]
unless (options.values & invalid_option_values).empty?