re-store controllmaster in various places where it got removed.
This commit is contained in:
@@ -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}'")
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user