mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #11954 from allanparsons/develop
Added parameters to skip host checking when going through an ssh_gateway.
This commit is contained in:
commit
ff02cbdcb1
@ -1393,7 +1393,13 @@ def scp_file(dest_path, contents, kwargs):
|
|||||||
|
|
||||||
ssh_args.extend([
|
ssh_args.extend([
|
||||||
# Setup ProxyCommand
|
# 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_key,
|
||||||
ssh_gateway_user,
|
ssh_gateway_user,
|
||||||
ssh_gateway,
|
ssh_gateway,
|
||||||
@ -1528,7 +1534,13 @@ def root_cmd(command, tty, sudo, **kwargs):
|
|||||||
|
|
||||||
ssh_args.extend([
|
ssh_args.extend([
|
||||||
# Setup ProxyCommand
|
# 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_key,
|
||||||
ssh_gateway_user,
|
ssh_gateway_user,
|
||||||
ssh_gateway,
|
ssh_gateway,
|
||||||
|
Loading…
Reference in New Issue
Block a user