aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/shell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands/shell.rb')
-rw-r--r--lib/leap_cli/commands/shell.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb
index 13c5003..2ccb3de 100644
--- a/lib/leap_cli/commands/shell.rb
+++ b/lib/leap_cli/commands/shell.rb
@@ -47,13 +47,14 @@ module LeapCli; module Commands
def exec_ssh(cmd, args)
node = get_node_from_args(args, :include_disabled => true)
options = [
- "-o 'HostName=#{node.domain.full}'",
+ "-o 'HostName=#{node.ip_address}'",
# "-o 'HostKeyAlias=#{node.name}'", << oddly incompatible with ports in known_hosts file, so we must not use this or non-standard ports break.
"-o 'GlobalKnownHostsFile=#{path(:known_hosts)}'",
"-o 'UserKnownHostsFile=/dev/null'"
]
if node.vagrant?
options << "-i #{vagrant_ssh_key_file}" # use the universal vagrant insecure key
+ options << "-o IdentitiesOnly=yes" # force the use of the insecure vagrant key
options << "-o 'StrictHostKeyChecking=no'" # blindly accept host key and don't save it (since userknownhostsfile is /dev/null)
else
options << "-o 'StrictHostKeyChecking=yes'"