feat: manage ssh client config

Symlink .ssh/config into ~/.ssh with proper directory permissions.
Guard .gitignore so only the client config is trackable — keys and
anything else under .ssh/ can never be committed. Also drop a
redundant tmux ignore rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Brian Pooe 2026-07-06 21:16:01 +02:00
parent a33c46d130
commit 84b99788a7
3 changed files with 18 additions and 1 deletions

5
.gitignore vendored
View file

@ -26,8 +26,11 @@ nvim.log
# Ignore generated or downloaded tmux content.
.config/tmux/**
.config/tmux/current-theme.conf
!.config/tmux/dragon-theme.conf
!.config/tmux/wave-theme.conf
!.config/tmux/tmux-cheatsheet.md
!.config/tmux/tmux.conf
# Track only the ssh client config — never keys or anything else.
.ssh/*
!.ssh/config

11
.ssh/config Normal file
View file

@ -0,0 +1,11 @@
Host caddy
HostName 10.0.15.5
User brian
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
Host technitium
HostName 10.0.10.5
User brian
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes

View file

@ -11,6 +11,9 @@ link_dotfiles() {
backup_and_link "$DOTFILES_DIR/.config/.ideavimrc" "$HOME/.ideavimrc"
backup_and_link "$DOTFILES_DIR/.zshrc" "$HOME/.zshrc"
backup_and_link "$DOTFILES_DIR/.gitconfig" "$HOME/.gitconfig"
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
backup_and_link "$DOTFILES_DIR/.ssh/config" "$HOME/.ssh/config"
backup_and_link "$DOTFILES_DIR/bin/dotfiles-apply-theme" "$HOME/.local/bin/dotfiles-apply-theme"
}