diff --git a/ssh/config b/ssh/config deleted file mode 100644 index fe3085f..0000000 --- a/ssh/config +++ /dev/null @@ -1,14 +0,0 @@ -CanonicalizeMaxDots 5 -CanonicalizeHostname yes -CanonicalDomains nerdland.org - -Host gitea.* github.com - User git - -Host *.nerdland.org *.nerdland.it.cx - AddressFamily inet6 - -Host * - IdentityFile ~/.ssh/id_%L-%h - -# vim: ft=sshconfig diff --git a/ssh/epilogue b/ssh/epilogue new file mode 100644 index 0000000..8001630 --- /dev/null +++ b/ssh/epilogue @@ -0,0 +1,8 @@ +Host gitea.* github.com gitlab.com *.github.com *.gitlab.com + User git + + +Host * + IdentityFile ~/.ssh/id_%L-%h + +# vim: ft=sshconfig diff --git a/ssh/prologue b/ssh/prologue new file mode 100644 index 0000000..72afa6d --- /dev/null +++ b/ssh/prologue @@ -0,0 +1,12 @@ +# This scans your resolver and then custom-creates a config file +# for your current resolver situation. +# +# That config uses Canonicalization to emulate what your local resolver +# does in these circumstances. +Match exec 'rm -f ~/ssh/search | false' + +Match exec 'grep "^search" /etc/resolv.conf ' exec 'grep search /etc/resolv.conf | awk \'{print "Host *\n\tCanonicalDomains "$2"\n\tCanonicalizeHostname yes\n# v""im:ft=sshconfig"}\' > ~/.ssh/search' + + Include ~/.ssh/search + +# vim: ft=sshconfig