From 10438791d580cacf5ed10d3b5e69edf89dd209aa Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Mon, 6 Jan 2025 12:22:07 +0000
Subject: [PATCH] Update reverseSSHproxy.sh

---
 reverseSSHproxy.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/reverseSSHproxy.sh b/reverseSSHproxy.sh
index 0c9a0f6..b073ff6 100755
--- a/reverseSSHproxy.sh
+++ b/reverseSSHproxy.sh
@@ -4,7 +4,11 @@ SSHPORT_INT=2223
 SSHPORT=2222
 PROXY_HOST=aquila.tetras-libre.fr
 while true; do
+    set -x
     /usr/bin/ssh -i /root/.ssh/id_rsa -N -R ${HTTPS_PORT}:localhost:443 -R ${SSHPORT_INT}:localhost:22 -o "ExitOnForwardFailure yes" -o "StrictHostKeyChecking no" -o "ServerAliveInterval 60" sshuser@${PROXY_HOST} -p ${SSHPORT}
+    set +x
     echo "Ssh failed $?"
+    # just in case this is blocking
+    /usr/bin/ssh-keygen -f "/root/.ssh/known_hosts" -R "[aquila.tetras-libre.fr]:2222"
     sleep 5
-done
+done
\ No newline at end of file
-- 
GitLab