Split ssh config into common plus a host layer
Putting the whole ssh config in common/ was wrong twice over. It mapped git.rcjohnstone.com to localhost:2222, which is only true on mainframe where Gitea runs -- on system76 it broke git entirely. And it replaced a 77-line file holding 13 personal host aliases (storagebox, several forwarded localhost ports, older work hosts) with a five-entry fleet list. common/ssh/config now Includes ~/.ssh/config.local first, so host entries win on the first-value-obtained rule, and carries only the fleet aliases. Each host keeps its own list; system76's is restored verbatim.
This commit is contained in:
+14
-7
@@ -1,11 +1,8 @@
|
||||
# Host aliases only. No keys, no secrets.
|
||||
|
||||
Host git.rcjohnstone.com
|
||||
HostName localhost
|
||||
Port 2222
|
||||
User connor
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
# Host-specific aliases come first: ssh takes the FIRST value it obtains for
|
||||
# each keyword, so anything in config.local wins over the fleet defaults below.
|
||||
Include ~/.ssh/config.local
|
||||
|
||||
# --- the fleet -------------------------------------------------------------
|
||||
Host nas
|
||||
HostName 10.0.0.3
|
||||
User connor
|
||||
@@ -13,6 +10,8 @@ Host nas
|
||||
Host mainframe
|
||||
HostName 10.0.0.2
|
||||
User connor
|
||||
ServerAliveInterval 30
|
||||
ServerAliveCountMax 6
|
||||
|
||||
Host system76
|
||||
HostName 10.0.0.4
|
||||
@@ -21,3 +20,11 @@ Host system76
|
||||
Host work_laptop
|
||||
HostName 10.0.0.8
|
||||
User connorjohnstone
|
||||
|
||||
# Correct from every machine except mainframe itself, which overrides it in
|
||||
# hosts/mainframe/ssh/config.local — there, Gitea is a local port.
|
||||
Host git.rcjohnstone.com
|
||||
HostName 10.0.0.2
|
||||
Port 2222
|
||||
User connor
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
|
||||
Reference in New Issue
Block a user