Created
May 12, 2024 08:52
-
-
Save hieu-v/607821fb5e829c5d0b65a3cf5ba53b62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PATH="/usr/local/bin:$PATH" | |
while true; do | |
autossh -M 0 -D 1337 -q -C -N -o "ConnectTimeout 2" -o "ServerAliveInterval 5" local-server | |
# Sleep for a few seconds before retrying | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment