From 4cb719cd459a7b53e40e57d8dcf4e2cdf72e99f9 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Thu, 24 Jul 2025 12:46:11 +0100 Subject: added ConnectionAttempts ssh option --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 71aae13..cba59b8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -579,7 +579,9 @@ async fn machine_containers_save_logs( async fn machine_copy_logs_dir(ctx: &Context, machine: Machine, output_dir: &Path) -> Result<()> { tracing::info!("copying container logs from machine"); - let mut rsync_rsh = format!("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"); + let mut rsync_rsh = format!( + "ssh -o ConnectionAttempts=3 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + ); if ctx.node == ExecutionNode::Unknown { rsync_rsh += &format!(" -J {}", ctx.frontend_hostname()?); } @@ -673,6 +675,8 @@ async fn machine_run( stdin: Option<&str>, ) -> Result { let ssh_common = &[ + "-o", + "ConnectionAttempts=3", "-o", "StrictHostKeyChecking=no", "-o", -- cgit