dotfiles/.bin/icb-tunnel
2024-08-27 08:09:14 +02:00

9 lines
457 B
Bash
Executable File

#!/bin/ksh
#pkill -f "7326:localhost:7326 anonicb@slackers.openbsd.org"
#sleep 1
#ssh -fN -o ServerAliveInterval=15 -L 7326:localhost:7326 anonicb@slackers.openbsd.org
#autossh -M 0 -f -T -N -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -L 7326:localhost:7326 anonicb@slackers.openbsd.org
/usr/bin/netstat -n \
| /usr/bin/grep -q '127\.0\.0\.1\.7326' \
|| ssh -fN -o ServerAliveInterval=15 -L 7326:localhost:7326 anonicb@slackers.openbsd.org \