#!/bin/bash
while true; do
  ssh -i ~/.ssh/id_ed25519 -N \
      -o ServerAliveInterval=30 -o ServerAliveCountMax=3 \
      -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=accept-new \
      -L 12090:127.0.0.1:2090 cebers_mini@Cebers-mini.local
  echo "[$(date)] tunnel dropped, reconnecting in 5s" >> /tmp/tunnel2090.log
  sleep 5
done
