From f0c9d0a1fe8b19edf53f775dffb66057c0c9be12 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 11 Jun 2013 12:24:42 -0700 Subject: fix longstanding problem with vagrant nodes: everyone has a different ssh pub key, but before leap_cli wanted you to commit these different keys into. Now, for vagrant nodes, we ignore the host key: we don't save it, we don't check it. --- lib/leap_cli/util/remote_command.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/leap_cli/util/remote_command.rb') diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb index 2c77196..1197bfe 100644 --- a/lib/leap_cli/util/remote_command.rb +++ b/lib/leap_cli/util/remote_command.rb @@ -46,6 +46,7 @@ module LeapCli; module Util; module RemoteCommand { :config => false, :global_known_hosts_file => path(:known_hosts), + :user_known_hosts_file => '/dev/null', :paranoid => true } end @@ -95,11 +96,15 @@ module LeapCli; module Util; module RemoteCommand end def contingent_ssh_options_for_node(node) + opts = {} if node.vagrant? - {:keys => [vagrant_ssh_key_file]} - else - {} + opts[:keys] = [vagrant_ssh_key_file] + opts[:paranoid] = false # we skip host checking for vagrant nodes, because fingerprint is different for everyone. + if LeapCli::log_level <= 1 + opts[:verbose] = :error # suppress all the warnings about adding host keys to known_hosts, since it is not actually doing that. + end end + return opts end end; end; end \ No newline at end of file -- cgit v1.2.3