Hallo liebe OpenSuse-Gemeinde
Ich nutze seid ~1,5 Jahren Tumbleweed mit Fulldisk-Encryption und habe diese Woche auf meinem Server Leap 15.2 installiert.
Der Server:
- Mainboard: Fujitsu D3417-B (Industrie-Mainboard mit Extended Lifecycle)
- CPU: Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
- RAM: 8 + 16GB ECC - Kingston 2400 MHz DDR4
- SystemDisk: 120GB NVME-SSD
- Storage-HDDs: 2x4TB btrfs Raid1
Die Installation erfolgte auf einer 120GB nvme SSD. Dazu habe ich LVM mit Btrfs gewählt, außerdem habe ich die gesamte SSD verschlüsselt.
Nun möchte ich die SSD gern per SSH entschlüsseln können.
(Das Mainboard hat auch Intel AMT und solche Sache. Diese proprietären Geschichten möchte aber nicht nutzen. Außerdem wäre die Lösung per SSH universeller.)
Nach Internetrecherche habe ich leider nur Informationen zu anderen Betriebssystemen gefunden.z.B.:
- CentOS-Forum - dracut-sshd
- Blogeintrag bezüglich Ubuntu + dropbear-initramfs
- GitHub-Page von dracut-sshd
Was ich aus diesen und anderen Quellen bisher herausfinden konnte:
- dropbear-initramfs ist für OpenSuse keine Alternative, da es (wegen der Nutzung von Dracut?) keine Pakete gibt
- dracut-crypt-ssh ist "tot" - siehe Github
- dracut-sshd ist für Tumbleweed als offizelles Paket vorhanden und für Leap15.2 als communityPaket
Was ich daraufhin getan habe:
Dracut-sshd von obs://build.opensuse.org/home:Monex installiert:
suse:~ # zypper info dracut-sshd
Information for package dracut-sshd:
----------------------------------
Repository : dracut-sshd
Name : dracut-sshd
Version : 0.5.1-lp152.3.1
Arch : noarch
Vendor : obs://build.opensuse.org/home:Monex
Installed Size : 20,4 KiB
Installed : Yes
Status : up-to-date
Source package : dracut-sshd-0.5.1-lp152.3.1.src
Summary : Provide SSH access to initramfs early user space
Description :
This Dracut module integrates the OpenSSH sshd into your
initramfs. It allows for remote unlocking of a fully encrypted
root filesystem and remote access to the Dracut emergency shell
(i.e. early userspace).
Alles anzeigen
suse:~ # ls -all /usr/lib/dracut/modules.d/
total 0
drwxr-xr-x 1 root root 1566 3. Sep 02:16 .
drwxr-xr-x 1 root root 300 10. Jun 17:00 ..
drwxr-xr-x 1 root root 30 3. Sep 00:21 00bash
drwxr-xr-x 1 root root 30 3. Sep 00:21 00systemd
drwxr-xr-x 1 root root 54 3. Sep 00:21 00warpclock
drwxr-xr-x 1 root root 30 3. Sep 00:21 01systemd-initrd
drwxr-xr-x 1 root root 30 3. Sep 00:21 02systemd-networkd
drwxr-xr-x 1 root root 70 3. Sep 00:21 03modsign
drwxr-xr-x 1 root root 30 3. Sep 00:21 03rescue
drwxr-xr-x 1 root root 84 3. Sep 00:21 04watchdog
drwxr-xr-x 1 root root 130 3. Sep 00:21 10i18n
drwxr-xr-x 1 root root 84 3. Sep 00:21 30convertfs
drwxr-xr-x 1 root root 388 3. Sep 00:21 35network-legacy
drwxr-xr-x 1 root root 72 3. Sep 00:21 35network-manager
drwxr-xr-x 1 root root 106 3. Sep 00:21 40network
drwxr-xr-x 1 root root 58 3. Sep 00:21 45ifcfg
drwxr-xr-x 1 root root 50 3. Sep 00:21 45url-lib
drwxr-xr-x 1 root root 76 3. Sep 02:16 46sshd
drwxr-xr-x 1 root root 30 3. Sep 00:21 50drm
drwxr-xr-x 1 root root 208 3. Sep 00:21 50plymouth
drwxr-xr-x 1 root root 108 3. Sep 00:21 80cms
drwxr-xr-x 1 root root 70 3. Sep 00:21 80lvmmerge
drwxr-xr-x 1 root root 68 3. Sep 00:21 81cio_ignore
drwxr-xr-x 1 root root 166 3. Sep 00:21 90btrfs
drwxr-xr-x 1 root root 250 3. Sep 00:21 90crypt
drwxr-xr-x 1 root root 168 3. Sep 00:21 90dm
drwxr-xr-x 1 root root 110 3. Sep 00:21 90dmraid
drwxr-xr-x 1 root root 402 3. Sep 00:21 90dmsquash-live
drwxr-xr-x 1 root root 30 3. Sep 00:21 90dmsquash-live-ntfs
drwxr-xr-x 1 root root 86 3. Sep 00:21 90kernel-modules
drwxr-xr-x 1 root root 30 3. Sep 00:21 90kernel-modules-extra
drwxr-xr-x 1 root root 30 3. Sep 00:21 90kernel-network-modules
drwxr-xr-x 1 root root 168 3. Sep 00:21 90livenet
drwxr-xr-x 1 root root 100 3. Sep 00:21 90lvm
drwxr-xr-x 1 root root 464 3. Sep 00:21 90mdraid
drwxr-xr-x 1 root root 222 3. Sep 00:21 90multipath
drwxr-xr-x 1 root root 30 3. Sep 00:21 90nvdimm
drwxr-xr-x 1 root root 30 3. Sep 00:21 90qemu
drwxr-xr-x 1 root root 30 3. Sep 00:21 90qemu-net
drwxr-xr-x 1 root root 74 3. Sep 00:21 91crypt-gpg
drwxr-xr-x 1 root root 64 3. Sep 00:21 91crypt-loop
drwxr-xr-x 1 root root 102 3. Sep 00:21 91zipl
drwxr-xr-x 1 root root 108 3. Sep 00:21 95cifs
drwxr-xr-x 1 root root 64 3. Sep 00:21 95dasd_mod
drwxr-xr-x 1 root root 56 3. Sep 00:21 95dasd_rules
drwxr-xr-x 1 root root 62 3. Sep 00:21 95dcssblk
drwxr-xr-x 1 root root 30 3. Sep 00:21 95debug
drwxr-xr-x 1 root root 202 3. Sep 00:21 95fcoe
drwxr-xr-x 1 root root 64 3. Sep 00:21 95fcoe-uefi
drwxr-xr-x 1 root root 54 3. Sep 00:21 95fstab-sys
drwxr-xr-x 1 root root 146 3. Sep 00:21 95iscsi
drwxr-xr-x 1 root root 160 3. Sep 00:21 95lunmask
drwxr-xr-x 1 root root 114 3. Sep 00:21 95nbd
drwxr-xr-x 1 root root 170 3. Sep 00:21 95nfs
drwxr-xr-x 1 root root 30 3. Sep 00:21 95qeth_rules
drwxr-xr-x 1 root root 78 3. Sep 00:21 95resume
drwxr-xr-x 1 root root 148 3. Sep 00:21 95rootfs-block
drwxr-xr-x 1 root root 30 3. Sep 00:21 95ssh-client
drwxr-xr-x 1 root root 30 3. Sep 00:21 95suse-btrfs
drwxr-xr-x 1 root root 70 3. Sep 00:19 95suse-xfs
drwxr-xr-x 1 root root 30 3. Sep 00:21 95terminfo
drwxr-xr-x 1 root root 168 3. Sep 00:21 95udev-rules
drwxr-xr-x 1 root root 90 3. Sep 00:21 95virtfs
drwxr-xr-x 1 root root 56 3. Sep 00:21 95zfcp_rules
drwxr-xr-x 1 root root 70 3. Sep 00:21 97biosdevname
drwxr-xr-x 1 root root 1822 3. Sep 00:21 98dracut-systemd
drwxr-xr-x 1 root root 76 3. Sep 00:21 98ecryptfs
drwxr-xr-x 1 root root 30 3. Sep 00:21 98haveged
drwxr-xr-x 1 root root 54 3. Sep 00:21 98pollcdrom
drwxr-xr-x 1 root root 72 3. Sep 00:21 98selinux
drwxr-xr-x 1 root root 206 3. Sep 00:21 98syslog
drwxr-xr-x 1 root root 54 3. Sep 00:21 98usrmount
drwxr-xr-x 1 root root 206 3. Sep 00:21 99base
drwxr-xr-x 1 root root 48 3. Sep 00:21 99fs-lib
drwxr-xr-x 1 root root 50 3. Sep 00:21 99img-lib
drwxr-xr-x 1 root root 52 3. Sep 00:21 99shutdown
drwxr-xr-x 1 root root 152 3. Sep 00:21 99squash
drwxr-xr-x 1 root root 70 3. Sep 00:21 99suse
drwxr-xr-x 1 root root 30 3. Sep 00:21 99suse-initrd
drwxr-xr-x 1 root root 52 3. Sep 00:21 99uefi-lib
Alles anzeigen
Anschließend habe ich folgende Dateien Erstellt:
install_items+=" /etc/systemd/network/20-wired.network "
add_dracutmodules+=" systemd-networkd "
Letztendlich noch mittels dracut -f -v das Initramfs neu erstellt.
Nach der Erstellung ist das Modul laut lsinitrd vorhanden.
Leider ist der Server aber nach dem Reboot nicht pingbar. Es kommt nur die Aufforderung, das Passwort zum entschlüsseln einzugeben (in der lokalen Konsole am Server). Wenn ich nach dem Abbrechen der Eingabe des Passwortes in die Grub-cmd-line gehe, kann ich aber dhcp aktivieren und der Rechner ist pingbar.
Hat jemand eine Idee, wie ich den Networkd mit Dracut so zum laufen bekomme, dass ich den sshd im intiramfs erreiche?
Oder gibt es eine andere Lösung?<br><br>Vielen Dank im Voraus und allen eine angenehme Nachtruhe :-)