Skip to content

Commit 6c9017c

Browse files
committed
fix: set AUTOSSH_POLL and modify monitoring ports
Reference: https://stackoverflow.com/questions/61732346/autossh-tunnel-getting-killed-after-10-minutes run-ci
1 parent fa7074d commit 6c9017c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ssh-keepalive/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ MAX_INTERVAL=32
4545

4646
while true; do
4747
# Start autossh and ignore its exit status
48-
autossh -M 30038:32593 -o "StrictHostKeyChecking=no" -o "ServerAliveInterval=30" -o "ServerAliveCountMax=3" -N "${SSH_COMMAND}" -p "${SSH_PORT}" || true
48+
AUTOSSH_POLL=60 autossh -M 57754:54909 -o "StrictHostKeyChecking=no" -o "ServerAliveInterval=30" -o "ServerAliveCountMax=3" -N "${SSH_COMMAND}" -p "${SSH_PORT}" || true
4949

5050
# If autossh exits, print an error message
5151
echo "Error: autossh has exited. Retrying in ${RETRY_INTERVAL} seconds..."

0 commit comments

Comments
 (0)