From: martin f. krafft Date: Mon, 10 Jul 2023 13:32:18 +0000 (+0200) Subject: lotus wakeonlan proxy X-Git-Url: https://git.madduck.net/etc/ssh.git/commitdiff_plain/150617f01a5c3190b1a1ebdade5fe45fd6602c0c lotus wakeonlan proxy --- diff --git a/.ssh/config.in b/.ssh/config.in index b170563..6c33ac4 100644 --- a/.ssh/config.in +++ b/.ssh/config.in @@ -195,7 +195,7 @@ Host lotus | lotus.rw.madduck.net CheckHostIP no HostKeyAlias lotus ConnectTimeout 120 - ProxyCommand ssh wall.gern.madduck.net "wakeonlan -i 192.168.39.255 dc:fb:48:35:03:04 && sleep 10 && exec nc -w 30 %h %p" + ProxyCommand ssh wall.gern.madduck.net "wakeonlan -i 192.168.39.255 dc:fb:48:35:03:04 && n=30 && while ! nc -w 1 %h %p; do [ \$n -gt 0 ] || exit 1; printf "%%02d: " \$n >&2; n=\$((\$n-1)); done" #ProxyCommand bash -c "TARGETS=$( (TRIES=%h.{gern,lehel,rw}.madduck.net; eval fping -aAC1 -t500 $TRIES 2>&1 & eval fping6 -aAC1 -t500 $TRIES 2>&1; wait) | sed -rne 's, : ([[:digit:]]), @\1,p' | sort -t@ -k2n | sed -ne 's, .*,,p' | tr '\n' ','); echo Targets: \$TARGETS using \${TARGETS%%%%,*} … >&2; exec nc -F -vq0 \${TARGETS%%%%,*} %p" #ProxyUseFdpass yes LocalForward localhost:8385 localhost:8384