home.social

#cryptsetup — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cryptsetup, aggregated by home.social.

fetched live
  1. Unlocking Fully Encrypted Servers over Tor

    Remote servers should not have to choose between security and availability.

    For years, the common compromise has been to expose SSH to the public Internet or to rely on VPNs and provider-specific KVM consoles whenever a LUKS-encrypted server reboots.

    I believe there is a better approach.

    By combining LUKS, Tor Onion Services, and a lightweight SSH server running directly inside the initramfs, it is possible to build servers that remain fully encrypted at rest, yet can always be unlocked remotely without exposing any public management interface.

    This article describes the concept and how it could evolve into a reusable feature for Infinito.Nexus.

    The Problem

    Full disk encryption protects data when a server is powered off.

    However, after every reboot someone must enter the LUKS passphrase.

    For remote dedicated servers this usually means one of the following:

    • opening SSH to the Internet
    • connecting through a VPN
    • using a provider’s KVM/IPMI console
    • booting into a rescue system

    While remote unlocking via Dropbear inside the initramfs is already a well-known solution, it still typically relies on a publicly reachable IP address.

    The Idea

    Instead of exposing SSH publicly, start Tor directly inside the initramfs.

    The boot sequence would look like this:

    Server boots


    Kernel + initramfs


    Network initialization


    Tor starts


    Temporary Onion Service appears

    unlock-xxxxxxxx.onion


    SSH via Tor


    cryptsetup luksOpen


    Root filesystem unlocked


    Operating system boots


    Temporary Onion Service disappears

    The administrator simply connects through Tor:

    torsocks ssh [email protected]

    After entering the LUKS passphrase, the operating system continues booting normally.

    Separate Identities for Boot and Runtime

    One of the strongest aspects of this design is that boot-time and runtime use different Onion identities.

    Boot environment

    • dedicated Ed25519 key
    • dedicated Onion address
    • only SSH
    • exists only during boot

    Example:

    unlock-xxxxxxxx.onion

    Runtime environment

    Once the operating system has booted:

    • the initramfs exits
    • Tor inside initramfs stops
    • a new Tor instance starts
    • completely different Onion addresses become available

    For example:

    ssh-xxxxxxxx.onion
    cloud-xxxxxxxx.onion
    matrix-xxxxxxxx.onion
    mail-xxxxxxxx.onion

    The unlock address simply disappears.

    This cleanly separates the trust boundaries between the bootloader environment and the running operating system.

    Why Tor?

    Using Tor instead of exposing SSH directly provides several advantages:

    • no public IP address required
    • no exposed SSH port
    • no VPN infrastructure
    • works behind NAT or Carrier-Grade NAT
    • management interface is only reachable through the Tor network
    • additional network privacy
    • ideal for self-hosted infrastructure

    This is particularly attractive for servers hosted in data centers where administrators rarely have physical access.

    What Happens After a Crash?

    Whenever the server reboots:

    1. the initramfs starts
    2. networking is initialized
    3. Tor publishes the temporary Onion Service
    4. you connect via SSH
    5. you unlock LUKS
    6. the server continues booting

    No KVM console.

    No VPN.

    No public SSH endpoint.

    Only Tor.

    Of course, catastrophic failures such as a broken initramfs or missing network drivers still require traditional recovery methods such as a rescue system or KVM.

    Existing Building Blocks

    Most of the required components already exist today.

    My repository hetzner-arch-luks demonstrates how to deploy Arch Linux with full disk encryption on Hetzner servers and configure remote unlocking via SSH during the initramfs stage.

    Repository:

    https://github.com/kevinveenbirkenbach/hetzner-arch-luks

    Another project, linux-image-manager, automates the creation and customization of Linux images and could serve as the foundation for embedding Tor, Dropbear/TinySSH, and the required initramfs configuration into reusable images.

    Repository:

    https://github.com/kevinveenbirkenbach/linux-image-manager

    Together, these repositories provide much of the groundwork required for a fully automated implementation.

    Future Integration into Infinito.Nexus

    I envision this becoming a native feature of Infinito.Nexus.

    Provisioning a server could automatically:

    • install Arch Linux
    • configure LUKS full disk encryption
    • generate an initramfs containing:
      • Tor
      • Dropbear or TinySSH
      • cryptsetup
    • create a dedicated boot-time Onion Service
    • automatically switch to permanent runtime Onion Services after successful boot

    From the administrator’s perspective, recovering a rebooted server would be as simple as:

    torsocks ssh root@unlock-<hostname>.onion

    Enter the passphrase.

    The server continues booting.

    Nothing is ever exposed to the public Internet.

    Looking Ahead

    This concept combines three mature technologies:

    • LUKS
    • Tor Onion Services
    • Remote initramfs unlocking

    While each technology already exists independently, integrating them into a seamless provisioning workflow could significantly improve the security and usability of encrypted self-hosted infrastructure.

    For projects focused on digital sovereignty and privacy, removing the need for publicly exposed management interfaces is a natural next step.

    #ArchLinux #cryptsetup #Cybersecurity #DevOps #DigitalSovereignty #DiskEncryption #Dropbear #FullDiskEncryption #Hetzner #InfinitoNexus #InfrastructureAsCode #initramfs #Linux #LinuxSecurity #LUKS #OnionServices #OpenSource #Privacy #RemoteLUKSUnlock #RemoteServerManagement #RemoteUnlock #SecureBoot #SelfHostedInfrastructure #SelfHosting #ServerSecurity #SSHOverTor #TinySSH #Tor #TorHiddenServices
  2. Bonus: I can wake up the desktop through Home Assistant.

    And with VPN through Wireguard I then have access to my desktop system, its files and services that I need in rare cases.

    I used this article
    cyberciti.biz/security/how-to- from [email protected] . Thank you.

    2/n

    #homeassistant #cryptsetup #dropbear #ubuntu

  3. Bonus: I can wake up the desktop through Home Assistant.

    And with VPN through Wireguard I then have access to my desktop system, its files and services that I need in rare cases.

    I used this article
    cyberciti.biz/security/how-to- from [email protected] . Thank you.

    2/2

    #homeassistant #cryptsetup #dropbear #ubuntu

  4. Bonus: I can wake up the desktop through Home Assistant.

    And with VPN through Wireguard I then have access to my desktop system, its files and services that I need in rare cases.

    I used this article
    cyberciti.biz/security/how-to- from [email protected] . Thank you.

    2/2

    #homeassistant #cryptsetup #dropbear #ubuntu

  5. Bonus: I can wake up the desktop through Home Assistant.

    And with VPN through Wireguard I then have access to my desktop system, its files and services that I need in rare cases.

    I used this article
    cyberciti.biz/security/how-to- from [email protected] . Thank you.

    2/n

    #homeassistant #cryptsetup #dropbear #ubuntu

  6. Bonus: I can wake up the desktop through Home Assistant.

    And with VPN through Wireguard I then have access to my desktop system, its files and services that I need in rare cases.

    I used this article
    cyberciti.biz/security/how-to- from [email protected] . Thank you.

    2/2

    #homeassistant #cryptsetup #dropbear #ubuntu

  7. Today's desktop computer challenge: For the case I need access to my home desktop from remote, I trigger boot through wake on LAN and then remotely unlock the encrypted hard disks through SSH.

    The challenge: Two encrypted hard disks. Solution: For the second hard drive add a key file located on the first hard disk as additional slot through cryptsetup, update the configuration in `/etc/crypttab`. Done.

    1/n

    #ubuntu #dropbear #cryptsetup #wol

  8. Today's desktop computer challenge: For the case I need access to my home desktop from remote, I trigger boot through wake on LAN and then remotely unlock the encrypted hard disks through SSH.

    The challenge: Two encrypted hard disks. Solution: For the second hard drive add a key file located on the first hard disk as additional slot through cryptsetup, update the configuration in `/etc/crypttab`. Done.

    1/2

    #ubuntu #dropbear #cryptsetup #wol

  9. Today's desktop computer challenge: For the case I need access to my home desktop from remote, I trigger boot through wake on LAN and then remotely unlock the encrypted hard disks through SSH.

    The challenge: Two encrypted hard disks. Solution: For the second hard drive add a key file located on the first hard disk as additional slot through cryptsetup, update the configuration in `/etc/crypttab`. Done.

    1/2

    #ubuntu #dropbear #cryptsetup #wol

  10. Today's desktop computer challenge: For the case I need access to my home desktop from remote, I trigger boot through wake on LAN and then remotely unlock the encrypted hard disks through SSH.

    The challenge: Two encrypted hard disks. Solution: For the second hard drive add a key file located on the first hard disk as additional slot through cryptsetup, update the configuration in `/etc/crypttab`. Done.

    1/n

    #ubuntu #dropbear #cryptsetup #wol

  11. Today's desktop computer challenge: For the case I need access to my home desktop from remote, I trigger boot through wake on LAN and then remotely unlock the encrypted hard disks through SSH.

    The challenge: Two encrypted hard disks. Solution: For the second hard drive add a key file located on the first hard disk as additional slot through cryptsetup, update the configuration in `/etc/crypttab`. Done.

    1/2

    #ubuntu #dropbear #cryptsetup #wol

  12. LUKS/Fedora question: Does anybody know if there is a way to increase the number of passphrase attempts to unlock the encrypted partition at boot before cryptsetup failure ?

    #Linux #Fedora #LUKS #CryptSetup #GNOME

  13. LUKS/Fedora question: Does anybody know if there is a way to increase the number of passphrase attempts to unlock the encrypted partition at boot before cryptsetup failure ?

    #Linux #Fedora #LUKS #CryptSetup #GNOME

  14. LUKS/Fedora question: Does anybody know if there is a way to increase the number of passphrase attempts to unlock the encrypted partition at boot before cryptsetup failure ?

    #Linux #Fedora #LUKS #CryptSetup #GNOME

  15. My experience with #FlashDrives recently has been mixed. I have no problem in encrypting them with #LUKS, using #cryptsetup or with formatting a partition with #Btrfs, for instance, using #gparted and doing other tinkering with #Gnome #disks. But the problem has been with the actual drives themselves. The cheaper ones seem to have quite a few bad sectors, etc. and so they’re not really reliable for medium term storage.

    1/2

    #Hardware #StorageDevices #Unix #GNU #Linux #Fedora

  16. My experience with #FlashDrives recently has been mixed. I have no problem in encrypting them with #LUKS, using #cryptsetup or with formatting a partition with #Btrfs, for instance, using #gparted and doing other tinkering with #Gnome #disks. But the problem has been with the actual drives themselves. The cheaper ones seem to have quite a few bad sectors, etc. and so they’re not really reliable for medium term storage.

    1/2

    #Hardware #StorageDevices #Unix #GNU #Linux #Fedora

  17. My experience with #FlashDrives recently has been mixed. I have no problem in encrypting them with #LUKS, using #cryptsetup or with formatting a partition with #Btrfs, for instance, using #gparted and doing other tinkering with #Gnome #disks. But the problem has been with the actual drives themselves. The cheaper ones seem to have quite a few bad sectors, etc. and so they’re not really reliable for medium term storage.

    1/2

    #Hardware #StorageDevices #Unix #GNU #Linux #Fedora

  18. My experience with #FlashDrives recently has been mixed. I have no problem in encrypting them with #LUKS, using #cryptsetup or with formatting a partition with #Btrfs, for instance, using #gparted and doing other tinkering with #Gnome #disks. But the problem has been with the actual drives themselves. The cheaper ones seem to have quite a few bad sectors, etc. and so they’re not really reliable for medium term storage.

    1/2

    #Hardware #StorageDevices #Unix #GNU #Linux #Fedora

  19. My experience with #FlashDrives recently has been mixed. I have no problem in encrypting them with #LUKS, using #cryptsetup or with formatting a partition with #Btrfs, for instance, using #gparted and doing other tinkering with #Gnome #disks. But the problem has been with the actual drives themselves. The cheaper ones seem to have quite a few bad sectors, etc. and so they’re not really reliable for medium term storage.

    1/2

    #Hardware #StorageDevices #Unix #GNU #Linux #Fedora

  20. In case someone else is wondering why linux luks hard disk encryption is usually within a lvm container: that way you only need one password to unlock multiple partitions.

    (found out the hard way)

    #linux #cryptsetup #harddisk #encryption

  21. In case someone else is wondering why linux luks hard disk encryption is usually within a lvm container: that way you only need one password to unlock multiple partitions.

    (found out the hard way)

    #linux #cryptsetup #harddisk #encryption

  22. In case someone else is wondering why linux luks hard disk encryption is usually within a lvm container: that way you only need one password to unlock multiple partitions.

    (found out the hard way)

    #linux #cryptsetup #harddisk #encryption

  23. In case someone else is wondering why linux luks hard disk encryption is usually within a lvm container: that way you only need one password to unlock multiple partitions.

    (found out the hard way)

    #linux #cryptsetup #harddisk #encryption

  24. In case someone else is wondering why linux luks hard disk encryption is usually within a lvm container: that way you only need one password to unlock multiple partitions.

    (found out the hard way)

    #linux #cryptsetup #harddisk #encryption

  25. So today I tired #mkfs.btrfs and this works. I was using #gparted, which can’t create #encrypted file systems and so I created a blank (cleared) one, used #cryptsetup to create the #encryption on the device, and then created the brtrfs file system.

    #GNU #FreeSoftware

  26. So today I tired #mkfs.btrfs and this works. I was using #gparted, which can’t create #encrypted file systems and so I created a blank (cleared) one, used #cryptsetup to create the #encryption on the device, and then created the brtrfs file system.

    #GNU #FreeSoftware

  27. So today I tired #mkfs.btrfs and this works. I was using #gparted, which can’t create #encrypted file systems and so I created a blank (cleared) one, used #cryptsetup to create the #encryption on the device, and then created the brtrfs file system.

    #GNU #FreeSoftware

  28. So today I tired #mkfs.btrfs and this works. I was using #gparted, which can’t create #encrypted file systems and so I created a blank (cleared) one, used #cryptsetup to create the #encryption on the device, and then created the brtrfs file system.

    #GNU #FreeSoftware

  29. So today I tired #mkfs.btrfs and this works. I was using #gparted, which can’t create #encrypted file systems and so I created a blank (cleared) one, used #cryptsetup to create the #encryption on the device, and then created the brtrfs file system.

    #GNU #FreeSoftware

  30. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  31. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  32. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  33. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  34. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  35. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  36. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  37. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  38. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  39. Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

    That's what I am building for my new working machine.

    Also WakeOnLan (via local network though).

    :boost_ok: #followerpower

  40. USBのケースに2.5インチHDDを?

    ?れて初期化しました.

    LUKSで暗号化のためにCryptsetupを,透過圧縮,重複排除も使いたいということでBtrFSを利用しました.

    […]

    https://matoken.org/blog/2024/11/12/initialize-usb-hdd-with-luks-btrfs/

  41. Восстановление данных с зашифрованного Linux тома с помощью cryptsetup

    В этой статье мы разберем восстановление данных с зашифрованного с помощью LUKS тома NAS. Внимание : в самом худшем случае для восстановления данных этим способом потребуется свободное место равное двум объемам зашифрованного раздела. Например, если у вас есть зашифрованный раздел на 1 ТБ, то необходимо иметь 2 ТБ свободного места. В лучшем случае (незначительные повреждения) понадобится один объем свободного дискового пространства. Также обращаем внимание, что вам НУЖНО ЗНАТЬ пароль, который использовался для шифрования тома Для примера мы будем использовать диск от QNAP с зашифрованном разделом. 1. Подключаем диск от QNAP к компьютеру с помощью USB или SATA. После чего нужно любым доступным способом создать образ зашифрованного раздела. Для примера мы будем использовать программу Vолга. Выбираем раздел QNAP и начинаем создание образа. Мы советуем сохранить образ в формате .img (посекторный RAW образ) на любой внешний диск.

    habr.com/ru/articles/855290/

    #Шифрование #luks #cryptsetup #зашифрованный_раздел #восстановление_данных #расшифровка_данных

  42. Восстановление данных с зашифрованного Linux тома с помощью cryptsetup

    В этой статье мы разберем восстановление данных с зашифрованного с помощью LUKS тома NAS. Внимание : в самом худшем случае для восстановления данных этим способом потребуется свободное место равное двум объемам зашифрованного раздела. Например, если у вас есть зашифрованный раздел на 1 ТБ, то необходимо иметь 2 ТБ свободного места. В лучшем случае (незначительные повреждения) понадобится один объем свободного дискового пространства. Также обращаем внимание, что вам НУЖНО ЗНАТЬ пароль, который использовался для шифрования тома Для примера мы будем использовать диск от QNAP с зашифрованном разделом. 1. Подключаем диск от QNAP к компьютеру с помощью USB или SATA. После чего нужно любым доступным способом создать образ зашифрованного раздела. Для примера мы будем использовать программу Vолга. Выбираем раздел QNAP и начинаем создание образа. Мы советуем сохранить образ в формате .img (посекторный RAW образ) на любой внешний диск.

    habr.com/ru/articles/855290/

    #Шифрование #luks #cryptsetup #зашифрованный_раздел #восстановление_данных #расшифровка_данных

  43. Восстановление данных с зашифрованного Linux тома с помощью cryptsetup

    В этой статье мы разберем восстановление данных с зашифрованного с помощью LUKS тома NAS. Внимание : в самом худшем случае для восстановления данных этим способом потребуется свободное место равное двум объемам зашифрованного раздела. Например, если у вас есть зашифрованный раздел на 1 ТБ, то необходимо иметь 2 ТБ свободного места. В лучшем случае (незначительные повреждения) понадобится один объем свободного дискового пространства. Также обращаем внимание, что вам НУЖНО ЗНАТЬ пароль, который использовался для шифрования тома Для примера мы будем использовать диск от QNAP с зашифрованном разделом. 1. Подключаем диск от QNAP к компьютеру с помощью USB или SATA. После чего нужно любым доступным способом создать образ зашифрованного раздела. Для примера мы будем использовать программу Vолга. Выбираем раздел QNAP и начинаем создание образа. Мы советуем сохранить образ в формате .img (посекторный RAW образ) на любой внешний диск.

    habr.com/ru/articles/855290/

    #Шифрование #luks #cryptsetup #зашифрованный_раздел #восстановление_данных #расшифровка_данных

  44. TIL: If you want to `cryptsetup open` a BitLocker encrypted drive using the recovery key (8 blocks of 6 digits each), make sure to enter it _with_ the dashes between each block of digits, else it won't be recognized.

    #Linux #Windows #BitLocker #cryptsetup

  45. TIL: If you want to `cryptsetup open` a BitLocker encrypted drive using the recovery key (8 blocks of 6 digits each), make sure to enter it _with_ the dashes between each block of digits, else it won't be recognized.

    #Linux #Windows #BitLocker #cryptsetup

  46. TIL: If you want to `cryptsetup open` a BitLocker encrypted drive using the recovery key (8 blocks of 6 digits each), make sure to enter it _with_ the dashes between each block of digits, else it won't be recognized.

    #Linux #Windows #BitLocker #cryptsetup