mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #20409 from jfindlay/fix_ssh_tests
only add successfully generated ssh keys to config
This commit is contained in:
commit
9e74a0c200
@ -398,9 +398,12 @@ class TestDaemon(object):
|
||||
|
||||
with salt.utils.fopen(os.path.join(TMP_CONF_DIR, 'sshd_config'), 'a') as ssh_config:
|
||||
ssh_config.write('AuthorizedKeysFile {0}\n'.format(auth_key_file))
|
||||
ssh_config.write('HostKey {0}\n'.format(server_dsa_priv_key_file))
|
||||
ssh_config.write('HostKey {0}\n'.format(server_ecdsa_priv_key_file))
|
||||
ssh_config.write('HostKey {0}\n'.format(server_ed25519_priv_key_file))
|
||||
if not keygen_dsa_err:
|
||||
ssh_config.write('HostKey {0}\n'.format(server_dsa_priv_key_file))
|
||||
if not keygen_escda_err:
|
||||
ssh_config.write('HostKey {0}\n'.format(server_ecdsa_priv_key_file))
|
||||
if not keygen_ed25519_err:
|
||||
ssh_config.write('HostKey {0}\n'.format(server_ed25519_priv_key_file))
|
||||
|
||||
self.sshd_pidfile = os.path.join(TMP_CONF_DIR, 'sshd.pid')
|
||||
self.sshd_process = subprocess.Popen(
|
||||
|
Loading…
Reference in New Issue
Block a user