From 9d18604b9555ec328c38d457806900c58c0b8741 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 5331354..e809f4b 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);