(maint) Add some useful ssh options

When sshing to transient VMs it's super useful to ignore host key
checking. These options will make sure the host keys for the VMs are not
being checked and that they are not getting added to your existing known
hosts file.
This commit is contained in:
Morgan Rhodes 2017-01-26 11:24:18 -08:00
parent c8525bd0f1
commit 1b60afdc0f

View file

@ -30,7 +30,8 @@ class Ssh
end
hostname = "#{response[host_os]["hostname"]}.#{response["domain"]}"
cmd = "#{ssh_path} #{user}@#{hostname}"
ssh_options= ["-oStrictHostKeyChecking=no", "-oUserKnownHostsFile=/dev/null"]
cmd = "#{ssh_path} #{ssh_options.join(' ')} #{user}@#{hostname}"
# TODO: Should this respect more ssh settings? Can it be configured
# by users ssh config and does this respect those settings?