A lot more automation for ssh.

(And I probably broke something, but we'll see!)
This commit is contained in:
2025-03-07 23:11:04 -05:00
parent 8c304b5126
commit f31647d198
3 changed files with 20 additions and 14 deletions

View File

@ -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

8
ssh/epilogue Normal file
View File

@ -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

12
ssh/prologue Normal file
View File

@ -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