From: martin f. krafft Date: Fri, 26 Dec 2014 12:34:22 +0000 (+0100) Subject: Implement proxy locator command for roaming laptop X-Git-Url: https://git.madduck.net/etc/ssh.git/commitdiff_plain/4079aa0c3659b213d65aaed17cbf6c87227b22ea Implement proxy locator command for roaming laptop --- diff --git a/.ssh/config.in b/.ssh/config.in index 71a6184..c237b89 100644 --- a/.ssh/config.in +++ b/.ssh/config.in @@ -231,9 +231,7 @@ Host fishbowl | fishbowl.gern | fishbowl.lehel | fishbowl.rw.madduck.net ForwardAgent yes ForwardX11 yes HostKeyAlias fishbowl - CanonicalizeHostname yes - CanonicalizeMaxDots 0 - CanonicalDomains gern.madduck.net lehel.madduck.net rw.madduck.net + ProxyCommand bash -c "TARGETS=$( (TRIES=%h.{gern,lehel,rw}.madduck.net; eval fping -aAC1 -t100 $TRIES; eval fping6 -aAC1 -t100 $TRIES; wait) 2>&1 | sed -rne 's, : ([[:digit:]]), @\1,p' | sort -t@ -k2n | sed -ne 's, .*,,p' | tr '\n' ','); echo Targets: \$TARGETS using \${TARGETS%%%%,*} … >&2; nc -vq0 \${TARGETS%%%%,*} %p" ### LOCAL VIRT HOSTS