mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Added parameters to skip host checking when going to an ssh_gateway. Fixes #11836
This commit is contained in:
parent
d58000c7a8
commit
9f800b6f7f
@ -1393,7 +1393,13 @@ def scp_file(dest_path, contents, kwargs):
|
||||
|
||||
ssh_args.extend([
|
||||
# Setup ProxyCommand
|
||||
'-oProxyCommand="ssh {0} {1}@{2} -p {3} nc -q0 %h %p"'.format(
|
||||
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
||||
# Don't add new hosts to the host key database
|
||||
'-oStrictHostKeyChecking=no',
|
||||
# Set hosts key database path to /dev/null, ie, non-existing
|
||||
'-oUserKnownHostsFile=/dev/null',
|
||||
# Don't re-use the SSH connection. Less failures.
|
||||
'-oControlPath=none',
|
||||
ssh_gateway_key,
|
||||
ssh_gateway_user,
|
||||
ssh_gateway,
|
||||
@ -1528,7 +1534,13 @@ def root_cmd(command, tty, sudo, **kwargs):
|
||||
|
||||
ssh_args.extend([
|
||||
# Setup ProxyCommand
|
||||
'-oProxyCommand="ssh {0} {1}@{2} -p {3} nc -q0 %h %p"'.format(
|
||||
'-oProxyCommand="ssh {0} {1} {2} {3} {4}@{5} -p {6} nc -q0 %h %p"'.format(
|
||||
# Don't add new hosts to the host key database
|
||||
'-oStrictHostKeyChecking=no',
|
||||
# Set hosts key database path to /dev/null, ie, non-existing
|
||||
'-oUserKnownHostsFile=/dev/null',
|
||||
# Don't re-use the SSH connection. Less failures.
|
||||
'-oControlPath=none',
|
||||
ssh_gateway_key,
|
||||
ssh_gateway_user,
|
||||
ssh_gateway,
|
||||
|
Loading…
Reference in New Issue
Block a user