From 9a1268326a37b7595d35064c44f241024b4e12a0 Mon Sep 17 00:00:00 2001 From: Jan Funke Date: Thu, 27 Feb 2025 20:12:17 +0100 Subject: [PATCH] Added: SSH --- dot_ssh/config.d/private.conf | 63 +++++++++++++++++++++++++++++++++++ dot_ssh/config.tmpl | 26 +++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 dot_ssh/config.d/private.conf create mode 100644 dot_ssh/config.tmpl diff --git a/dot_ssh/config.d/private.conf b/dot_ssh/config.d/private.conf new file mode 100644 index 0000000..8dabe42 --- /dev/null +++ b/dot_ssh/config.d/private.conf @@ -0,0 +1,63 @@ +Host mail + HostName mail.servhub.eu + User jan + Port 22 + LocalForward 11334 127.0.0.1:11334 + IdentityFile ~/.ssh/id_ed25519 + +Host unlock-mail + HostName mail.servhub.eu + User root + Port 2865 + IdentityFile ~/.ssh/id_ed25519 + +Host cerberus + Hostname cerberus.ext.servhub.eu + user jan + Port 22 + IdentityFile ~/.ssh/id_ed25519 + +Host unlock-cerberus + HostName cerberus.ext.servhub.eu + user root + Port 2222 + IdentityFile ~/.ssh/id_ed25519 + +Host apollo + Hostname apollo.ext.servhub.eu + user jan + port 865 + IdentityFile ~/.ssh/id_ed25519 + +Host unlock-apollo + Hostname apollo.ext.servhub.eu + User root + Port 2222 + IdentityFile ~/.ssh/id_ed25519 + +Host andromeda + HostName andromeda.ext.servhub.eu + LocalForward 3001 127.0.0.1:3389 + +Host unlock-andromeda + HostName andromeda.ext.servhub.eu + User root + +Host sirius sirius.ext.servhub.eu + Hostname sirius.ext.servhub.eu + IdentityFile ~/.ssh/id_ed25519 + Port 22 + +Host mail2 mail2.ext.servhub.eu + HostName mail2.ext.servhub.eu + +Host aegis aegis.ext.servhub.eu + Hostname aegis.ext.servhub.eu + Port 865 + +# Defaults +Host Match final host *.servhub.eu + User jan + Port 22 + IdentityFile ~/.ssh/id_ed25519 + IdentitiesOnly yes diff --git a/dot_ssh/config.tmpl b/dot_ssh/config.tmpl new file mode 100644 index 0000000..aa6d70d --- /dev/null +++ b/dot_ssh/config.tmpl @@ -0,0 +1,26 @@ +# General settings +Host * + AddKeysToAgent yes + IdentitiesOnly yes + +{{- if eq .hostname "jans-mbp" }} +Host * + IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" +{{- end }} + +{{- if eq .chezmoi.os "darwin" }} +Host * + UseKeychain yes + +{{- end }} +# Privat +Include ~/.ssh/config.d/private.conf + +{{- if .addSemodia }} +# Semodia +Include ~/.ssh/config.d/semodia/semodia.conf +{{- end }} + +# Fallback +Host * + IdentityFile ~/.ssh/id_ed25519