fix: chmod 600 the ssh Include file (ssh rejects group-writable config)
rsync -a preserved steel141's 664 perms; ssh on the Mac then refused ~/mac/config/ssh_homelab as an Include target, breaking all Mac-side ssh including the backup transport. setup.sh now chmods it 600 after each rsync. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,7 @@ if [[ -f $HOME/.ssh/config ]] && grep -q '^Include ~/mac/config/ssh_homelab' "$H
|
||||
{ echo 'Include ~/mac/config/ssh_homelab'; [[ -f $HOME/.ssh/config ]] && cat "$HOME/.ssh/config"; } > "$HOME/.ssh/config.new"
|
||||
mv "$HOME/.ssh/config.new" "$HOME/.ssh/config"; chmod 600 "$HOME/.ssh/config"; log set "ssh config include"; CHANGED=1
|
||||
fi
|
||||
chmod 600 "$REPO/config/ssh_homelab" 2>/dev/null || true # ssh refuses a group/world-writable Include target
|
||||
ssh-keygen -F 192.168.0.173 >/dev/null || { ssh-keyscan -t ed25519 192.168.0.173 >> "$HOME/.ssh/known_hosts" 2>/dev/null; log set "known_hosts += pve173"; }
|
||||
|
||||
# ---------- defaults: Linux feel ----------
|
||||
|
||||
Reference in New Issue
Block a user