lib/chef/provisioning/transport/ssh.rb in chef-provisioning-0.16 vs lib/chef/provisioning/transport/ssh.rb in chef-provisioning-0.17
- old
+ new
@@ -180,11 +180,12 @@
protected
def session
@session ||= begin
ssh_start_opts = { timeout:10 }.merge(ssh_options)
- Chef::Log.debug("Opening SSH connection to #{username}@#{host} with options #{ssh_start_opts.inspect}")
+ Chef::Log.debug("Opening SSH connection to #{username}@#{host} with options #{ssh_start_opts.dup.tap {
+ |ssh| ssh.delete(:key_data) }.inspect}")
# Small initial connection timeout (10s) to help us fail faster when server is just dead
begin
if gateway? then gateway.ssh(host, username, ssh_start_opts)
else Net::SSH.start(host, username, ssh_start_opts)
end
@@ -283,10 +284,11 @@
gw_user = ssh_options[:ssh_username] unless gw_user
ssh_start_opts = { timeout:10 }.merge(ssh_options)
ssh_start_opts[:port] = gw_port || 22
- Chef::Log.debug("Opening SSH gateway to #{gw_user}@#{gw_host} with options #{ssh_start_opts.inspect}")
+ Chef::Log.debug("Opening SSH gateway to #{gw_user}@#{gw_host} with options #{ssh_start_opts.dup.tap {
+ |ssh| ssh.delete(:key_data) }.inspect}")
begin
Net::SSH::Gateway.new(gw_host, gw_user, ssh_start_opts)
rescue Errno::ETIMEDOUT
Chef::Log.debug("Timed out connecting to gateway: #{$!}")
raise InitialConnectTimeout.new($!)