re-store controllmaster in various places where it got removed.

This commit is contained in:
Jörg Thalheim
2025-05-27 15:39:09 +02:00
parent f3cdcef523
commit ddab4b5b94
7 changed files with 28 additions and 35 deletions

View File

@@ -88,7 +88,7 @@ def ssh_shell_from_deploy(
deploy_info: DeployInfo, runtime: AsyncRuntime, host_key_check: HostKeyCheck
) -> None:
if host := find_reachable_host(deploy_info, host_key_check):
host.interactive_ssh()
host.interactive_ssh()
else:
log.info("Could not reach host via clearnet 'addrs'")
log.info(f"Trying to reach host via tor '{deploy_info.tor}'")

View File

@@ -98,12 +98,8 @@ def upload(
raise ClanError(msg)
# TODO accept `input` to be an IO object instead of bytes so that we don't have to read the tarfile into memory.
with (
tar_path.open("rb") as f,
host.ssh_control_master() as ssh,
ssh.become_root() as sudo_ssh,
):
sudo_ssh.run(
with tar_path.open("rb") as f:
host.run(
[
"bash",
"-c",