From 0b3a78a4aea700bbd1431318050b11ab4e825520 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Mon, 15 Jun 2026 18:36:58 +0000 Subject: [PATCH] ssh tunnel can time out when idle Remote CDBA sessions currently rely on users configuring ServerAliveInterval in ~/.ssh/config to keep the underlying ssh connection active. Pass ServerAliveInterval and ServerAliveCountMax directly when the client launches ssh so otherwise idle tunnels stay alive and ssh can detect dead connections. Signed-off-by: Bjorn Andersson --- cdba.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cdba.c b/cdba.c index 68cbdc3..105e756 100644 --- a/cdba.c +++ b/cdba.c @@ -130,7 +130,10 @@ static int fork_ssh(const char *host, const char *cmd, int *pipes) close(piped_stderr[1]); if (host) { - execlp("ssh", "ssh", host, cmd, NULL); + execlp("ssh", "ssh", + "-o", "ServerAliveInterval=30", + "-o", "ServerAliveCountMax=3", + host, cmd, NULL); err(1, "launching ssh failed"); } else { execlp(cmd, cmd, NULL);