diff --git a/gtc-x11vnc.sh b/gtc-x11vnc.sh index 9d7dd1f..f6597ca 100755 --- a/gtc-x11vnc.sh +++ b/gtc-x11vnc.sh @@ -13,6 +13,9 @@ function usage { [ -z $userathost ] && usage [ -z $port ] && usage +# kill existing Session +tmux kill-session -t x11vnc2ssh >/dev/null 2>&1 + sshopts="-p $port -o BatchMode=yes -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new -o LogLevel=ERROR -o PreferredAuthentications=publickey $userathost" g_echo "Testing SSH-Connection"