Files
docu/shared/ssh/README.md
T
root e98e3a2b84 Ansible ins Repo migrieren und zentrale SSH-Keys in shared/ssh.
Playbooks liegen unter pve1/ansible und pve2/ansible; authorized_keys
als Fragmente mit Deploy-Skript und Ziel-Matrix für Proxmox, VM 101 und CTs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 11:24:31 +02:00

3.4 KiB

SSH — gemeinsame authorized_keys

Zentraler Katalog öffentlicher SSH-Keys (keine Private Keys). Stand aus den Hosts exportiert — bei neuem Laptop Key in fragments/ ergänzen, rebuild-assembled.sh laufen lassen.

Struktur

shared/ssh/
├── fragments/              # Einzelne Key-Gruppen (editierbar)
├── assembled/              # Fertige Sets pro Ziel (generiert)
├── rebuild-assembled.sh    # fragments → assembled
└── install-authorized-keys.sh
Fragment Inhalt
fragments/admin-workstations.pub DESKTOP-H9797I1, DESKTOP-J08NPU2
fragments/admin-laptops-extra.pub L7L1S5V, OJIEMRE, x380, Security Keys
fragments/admin-mobile.pub JuiceSSH, server6, WEBTOP
fragments/host-pve1.pub root@pve1 ed25519
fragments/host-pve2.pub root@pve2 (Ansible / Host-SSH)
fragments/legacy-pve1-rsa.pub Altes RSA auf pve1 (Kommentar „root@pve2“)

Assembled Sets → Ziel

Datei Deploy auf User
assembled/proxmox-root.pub pve1 192.168.10.5, pve2 192.168.10.4 root
assembled/vm101-jean.pub VM 101 Ubuntu 192.168.10.10 jean
assembled/pve2-lxc-root.pub CT 101 docker, 109 media, 110 AIDEV (pve2) root
assembled/authorized_keys.all.pub Referenz — alle Keys vereint

Matrix (Ist-Zustand)

Host Empfohlenes Set Anmerkung
root@pve1 proxmox-root + legacy RSA noch enthalten
root@pve2 proxmox-root ohne legacy RSA (reicht host-pve2)
jean@192.168.10.10 vm101-jean Ansible fish-setup nutzt jean + SSH
CT 101 (docker) pve2-lxc-root Ansible disk-maintenance
CT 109 (media) subset: admin + OJIEMRE aktuell nur OJIEMRE — bei Bedarf volles Set
CT 110 (aidev) pve2-lxc-root aktuell leer — Keys fehlen für Ansible

Neuen Key hinzufügen

  1. Passendes Fragment in fragments/*.pub editieren (eine Zeile pro Key)
  2. ./rebuild-assembled.sh
  3. ./install-authorized-keys.sh <target> oder manuell cat assembled/….pub >> ~/.ssh/authorized_keys

Deploy

cd /root/docu/shared/ssh

# Proxmox lokal
./install-authorized-keys.sh proxmox-root

# Remote
./install-authorized-keys.sh --remote root@192.168.10.4 proxmox-root

# VM 101
./install-authorized-keys.sh vm101-jean

# CTs auf pve2 (muss auf pve2 laufen)
./install-authorized-keys.sh pve2-lxc-root
./install-authorized-keys.sh pve2-lxc-root --ct 101

# Vorschau
./install-authorized-keys.sh --dry-run proxmox-root

Ansible

Host Ansible-Pfad Keys
pve1 pve1/ansible/ jean → VM 101
pve2 pve2/ansible/ root@pve2 → CTs

Symlink auf dem Host: ln -sfn /root/docu/pve{1,2}/ansible /root/ansible

Hinweise

  • Nur Public Keys ins Repo — niemals id_* ohne .pub oder .git-credentials-*
  • Zwei verschiedene ssh-rsa … root@pve2: aktueller Key auf pve2 vs. Legacy auf pve1 (legacy-pve1-rsa.pub)
  • CT 110: vor Ansible-Wartung Keys deployen (pve2-lxc-root)