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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Gitea runs on this machine; reach it on the loopback rather than out and back.
|
||||
Host git.rcjohnstone.com
|
||||
HostName localhost
|
||||
Port 2222
|
||||
User connor
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
@@ -0,0 +1 @@
|
||||
# No machine-specific ssh aliases on the NAS.
|
||||
@@ -0,0 +1,5 @@
|
||||
# Work-specific hosts.
|
||||
Host framework1
|
||||
HostName 100.100.61.12
|
||||
User scout-dev
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
@@ -0,0 +1,75 @@
|
||||
# Personal host aliases for this machine. Kept verbatim from the
|
||||
# pre-refit ~/.ssh/config; common/ssh/config Includes this first.
|
||||
|
||||
Host gitserver.idm.orionspace.com
|
||||
PreferredAuthentications publickey
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
|
||||
# Host gitlab.arcfield.com
|
||||
# PreferredAuthentications publickey
|
||||
# IdentityFile ~/.ssh/id_rsa
|
||||
|
||||
Host github.com
|
||||
HostName github.com
|
||||
User git
|
||||
PreferredAuthentications publickey
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
|
||||
Host tiny
|
||||
Hostname 192.168.1.188
|
||||
User connor
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
|
||||
Host devboard
|
||||
HostName localhost
|
||||
Port 9004
|
||||
|
||||
Host rfbr
|
||||
HostName localhost
|
||||
User rfbr
|
||||
Port 9003
|
||||
|
||||
Host work
|
||||
HostName localhost
|
||||
Port 9000
|
||||
User connor.johnstone@arcfield.com
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
|
||||
Host traccs
|
||||
HostName localhost
|
||||
Port 9012
|
||||
User azureuser
|
||||
IdentityFile ~/.ssh/tracss-demo_key.pem
|
||||
|
||||
Host orbitiq.space
|
||||
Port 8001
|
||||
User ubuntu
|
||||
IdentityFile ~/.ssh/tracss.pem
|
||||
|
||||
Host 18.188.195.42
|
||||
Port 8001
|
||||
User ubuntu
|
||||
IdentityFile ~/.ssh/tracss.pem
|
||||
|
||||
Host 3.31.241.208
|
||||
Port 8001
|
||||
User ubuntu
|
||||
IdentityFile ~/.ssh/tracss.pem
|
||||
|
||||
Host reverse.diff
|
||||
HostName localhost
|
||||
User ubuntu
|
||||
Port 9005
|
||||
IdentityFile ~/.ssh/ConnorKey.pem
|
||||
|
||||
Host edu
|
||||
HostName localhost
|
||||
User rroci
|
||||
Port 9007
|
||||
|
||||
Host box
|
||||
HostName u491382.your-storagebox.de
|
||||
Port 23
|
||||
User u491382
|
||||
PreferredAuthentications publickey
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
force: true
|
||||
|
||||
- link:
|
||||
~/.ssh/config.local: hosts/mainframe/ssh/config.local
|
||||
~/.config/git/identity: hosts/mainframe/git/identity
|
||||
~/.config/paru: common/paru
|
||||
~/.config/rbw: common/rbw
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
force: true
|
||||
|
||||
- link:
|
||||
~/.ssh/config.local: hosts/nas/ssh/config.local
|
||||
~/.config/git/identity: hosts/nas/git/identity
|
||||
~/.config/paru: common/paru
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
force: true
|
||||
|
||||
- link:
|
||||
~/.ssh/config.local: hosts/sctfw004/ssh/config.local
|
||||
~/.config/wallust: common/wallust
|
||||
~/.config/hypr/colors.conf: hosts/sctfw004/hypr/colors.conf
|
||||
~/.config/waybar/colors.css: hosts/sctfw004/waybar/colors.css
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
force: true
|
||||
|
||||
- link:
|
||||
~/.ssh/config.local: hosts/system76/ssh/config.local
|
||||
~/.config/wallust: common/wallust
|
||||
~/.config/hypr/colors.conf: hosts/system76/hypr/colors.conf
|
||||
~/.config/waybar/colors.css: hosts/system76/waybar/colors.css
|
||||
|
||||
Reference in New Issue
Block a user