X-Git-Url: https://git.madduck.net/etc/ssh.git/blobdiff_plain/c873f02f9800a94f1241370efcb1ab2b64348b39..fc46f4b3f4b1a1fe741752d0c1c790eae05b3fc1:/.ssh/Makefile diff --git a/.ssh/Makefile b/.ssh/Makefile index 111d692..2ba6e4a 100644 --- a/.ssh/Makefile +++ b/.ssh/Makefile @@ -28,11 +28,18 @@ SSH_VERSION = $(shell ssh -V 2>&1) config: $(LOCAL_CONFIG) config.in cat $^ > $@ case "$(SSH_VERSION)" in \ - (OpenSSH_6.[0123]*) \ + (OpenSSH_7.[12]*) \ + sed -ri -e 's,ProxyJump ([-.[:alnum:]]+),ProxyCommand ssh \1 nc -q0 %h %p,' $@ \ + ;; \ + (OpenSSH_6.*) \ sed -ri -e 's,^.+\bCanonical.+$$,##UNSUPPORTED##&,' \ - $@ \ + -e 's,^.+\bIgnoreUnknown\b.+$$,##UNSUPPORTED##&,' \ + -e 's,^.+\bUpdateHostKeys\b.+$$,##UNSUPPORTED##&,' \ + -e 's,^Match host ,Host ,' \ + $@; \ + sed -ri -e 's,ProxyJump ([-.[:alnum:]]+),ProxyCommand ssh \1 nc -q0 %h %p,' $@ \ ;; \ - (OpenSSH_5.[012345]*) \ + (OpenSSH_5.*) \ sed -ri -e 's,^.+\bControlPersist\b.+$$,##UNSUPPORTED##&,' \ -e 's,^.+\bIPQoS\b.+$$,##UNSUPPORTED##&,' \ -e 's,^.+\bCanonical.+$$,##UNSUPPORTED##&,' \ @@ -65,4 +72,7 @@ config: $(LOCAL_CONFIG) config.in $@ \ ;; \ esac; \ - sed -i -re '/^Host fishbowl/,/^[[:space:]]*ProxyCommand/s/ProxyCommand.*/Host localhost/' $@ + case "$$HOSTNAME" in \ + (fishbowl) \ + sed -i -re '/^Host fishbowl/,/^[[:space:]]*ProxyCommand/s/ProxyCommand.*/Host localhost/' $@; \ + esac