From 6c05cf1a984b1ffe089377c16fc0d23cadf5b22f Mon Sep 17 00:00:00 2001 From: Thomas Preisner Date: Sat, 24 Apr 2021 14:33:53 +0200 Subject: [PATCH] ssh: config: externalize host configuration Even though it may not be critical to have usernames, hostnames and the respective ssh ports out in the open as they usually aren't secret, it should still be avoided. --- .gitmodules | 3 +++ ssh/conf.d | 1 + ssh/config | 40 +++------------------------------------- 3 files changed, 7 insertions(+), 37 deletions(-) create mode 100644 .gitmodules create mode 160000 ssh/conf.d diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..eb2a1aa --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ssh/conf.d"] + path = ssh/conf.d + url = git@git.preisner.eu:preisi/ssh-config.git diff --git a/ssh/conf.d b/ssh/conf.d new file mode 160000 index 0000000..0de3082 --- /dev/null +++ b/ssh/conf.d @@ -0,0 +1 @@ +Subproject commit 0de3082a12e5d60d27df8a255fc312fa3664a305 diff --git a/ssh/config b/ssh/config index 5593fa6..95548e1 100644 --- a/ssh/config +++ b/ssh/config @@ -3,44 +3,10 @@ Host * AddKeysToAgent confirm -Host 0?? 0??? - HostName faui%h.informatik.uni-erlangen.de - ForwardAgent yes +# Include external config if available +Include conf.d/* -Host faui0? faui0?? faui0??? - HostName %h.informatik.uni-erlangen.de - ForwardAgent yes - -Host man? man?? big? - HostName faui49%h.informatik.uni-erlangen.de - ProxyJump ty28wuqu@i4lab1.informatik.uni-erlangen.de - -Match Host faui* - User ty28wuqu - -Host ircbox - HostName ircbox.informatik.uni-erlangen.de - User ty28wuqu - -Host irc - HostName tpreisner.de - User weechat - -Host server - HostName tpreisner.de - User root - -Host steep - Hostname steep.cs.fau.de - User preisi - Port 17 - -Host pi - HostName wg.tpreisner.de - # dynamic ip behind hostname would cause warnings - CheckHostIP no - -# use if they havent been defined yet: +# Use if they havent been defined yet: Host * Compression yes ForwardAgent no