aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/shell.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-11 12:24:42 -0700
committerelijah <elijah@riseup.net>2013-06-11 12:24:42 -0700
commitf0c9d0a1fe8b19edf53f775dffb66057c0c9be12 (patch)
treecc7150c5b3c2e467f9b37e6b2e282160320c51d2 /lib/leap_cli/commands/shell.rb
parent404353dcf345122c0f04555a572efc5417f1b661 (diff)
downloadleap_cli-f0c9d0a1fe8b19edf53f775dffb66057c0c9be12.tar.gz
leap_cli-f0c9d0a1fe8b19edf53f775dffb66057c0c9be12.tar.bz2
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.
Diffstat (limited to 'lib/leap_cli/commands/shell.rb')
-rw-r--r--lib/leap_cli/commands/shell.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb
index 822ef05..3a6cebc 100644
--- a/lib/leap_cli/commands/shell.rb
+++ b/lib/leap_cli/commands/shell.rb
@@ -39,11 +39,14 @@ module LeapCli; module Commands
options = [
"-o 'HostName=#{node.ip_address}'",
"-o 'HostKeyAlias=#{node.name}'",
- "-o 'GlobalKnownHostsFile=#{path(:known_hosts)}'",
- "-o 'StrictHostKeyChecking=yes'"
+ "-o 'GlobalKnownHostsFile=#{path(:known_hosts)}'"
]
if node.vagrant?
options << "-i #{vagrant_ssh_key_file}"
+ options << "-o 'StrictHostKeyChecking=no'" # \ together, these options allow us to just blindly accept
+ options << "-o 'UserKnownHostsFile=/dev/null'" # / what pub key the vagrant node has. useful, because it is different for everyone.
+ else
+ options << "-o 'StrictHostKeyChecking=yes'"
end
username = 'root'
# the echo sets the terminal title. it would be better to do this on the server