From 2b2d408e07843a23eb481b73a361b90c31843ce5 Mon Sep 17 00:00:00 2001 From: Gordon Grant-Stuart Date: Tue, 23 May 2023 17:24:21 +0100 Subject: [PATCH] it works now --- etc/tunnelkeeper.conf | 2 ++ tunnelkeeper | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/tunnelkeeper.conf b/etc/tunnelkeeper.conf index d04ddb1..97b4493 100644 --- a/etc/tunnelkeeper.conf +++ b/etc/tunnelkeeper.conf @@ -5,6 +5,8 @@ Host * TCPKeepAlive yes ServerAliveInterval 15 ServerAliveCountMax 3 + ControlMaster auto + StrictHostKeyChecking no # Examples # diff --git a/tunnelkeeper b/tunnelkeeper index 1f3ac5d..4ac8c31 100755 --- a/tunnelkeeper +++ b/tunnelkeeper @@ -27,6 +27,7 @@ function debugopt () { case "$(awk "/^$1/ {print \$2}" ${DEBUGCONF})" in 2) echo -n '-v';; 3) echo -n '-vvv';; + *) echo -n '';; esac } @@ -36,7 +37,8 @@ function dbg () { } function connect () { - ssh -F "${SSHCONF}" "$(debugopt $1)" -o "ControlMaster auto" -o "StrictHostKeyChecking no" -S "$BASEDIR/var/$1.tksock" -N $1 '#tunnelkeeper' 2>&1 | dbg $1 + bo="$(debugopt $1)" + ssh -F "${SSHCONF}" $bo -o -S "$BASEDIR/var/$1.tksock" -N $1 '#tunnelkeeper' 2>&1 | dbg $1 }