From 4079aa0c3659b213d65aaed17cbf6c87227b22ea Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 26 Dec 2014 13:34:22 +0100 Subject: [PATCH] Implement proxy locator command for roaming laptop --- .ssh/config.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 -- 2.39.5