Skip to content
Snippets Groups Projects
Commit 1630d30b authored by Timothee Besset's avatar Timothee Besset
Browse files

do not use a known_hosts file at all in the remote shell code paths. we were...

do not use a known_hosts file at all in the remote shell code paths. we were already not doing strict host key checking anyway, this reduces warning spam. plus cleanup unused/inadequate live_ssh_command.
parent f271f174
Branches
Tags
No related merge requests found
......@@ -615,12 +615,9 @@ class DevkitClient(object):
# NOTE: this is the path to the ssh client, and may contain spaces (especially likely on windows)
self.ssh
]
if self.ssh_known_hosts is not None:
cmd += [
'-o', f'UserKnownHostsFile={self.ssh_known_hosts}',
]
cmd += [
'-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
'-o', 'IdentitiesOnly=yes',
'-t',
'-i', self.keypath,
......@@ -628,20 +625,6 @@ class DevkitClient(object):
]
return cmd
def live_ssh_command(self, username, ipaddress, command):
logger.debug('%s@%s: %s', username, ipaddress, command)
cmd = self.remote_shell_command(username, ipaddress)
cmd.append(command)
exit_status = subprocess.call(
cmd,
creationflags=SUBPROCESS_CREATION_FLAGS
)
logger.info("exit status is %d", exit_status)
if exit_status != 0:
raise subprocess.CalledProcessError(exit_status, command)
def ssh_command(
self, username, ipaddress, command, stdindata,
stream_output_to=None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment