Skip to content

Provide SSH access to initramfs early user space on Fedora and other systems that use Dracut

Notifications You must be signed in to change notification settings

yansigit/dracut-sshd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

This file explains how to enable the NetworkManager module for dracut-sshd.

To use NetworkManager instead of networkd, follow these steps:

  1. Install sudo dnf install dracut-network

  2. execute usermod -p '*' root on root user

  3. Copy the 46sshd and 99sshd-networkmanager subdirectories to the Dracut module directory:

    sudo cp -r 46sshd /usr/lib/dracut/modules.d
    sudo cp -r 99sshd-networkmanager /usr/lib/dracut/modules.d
    sudo cp -r 99cryptsetup-fdisk-lsblk /usr/lib/dracut/modules.d
  4. Create an authorized keys file at /root/.ssh/authorized_keys. This file should contain the public keys that you want to use to connect to the system during early boot. For example:

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1... [email protected]
    
    
  5. Set the mountpoint for the encrypted root partition in the /etc/fstab file. For example:

    /dev/mapper/encrypted_data /var/data xfs defaults 0 0
    
  6. Regenerate the initramfs:

    sudo dracut -f -v

This will enable NetworkManager in the initramfs, allowing you to connect to the system remotely during early boot.

About

Provide SSH access to initramfs early user space on Fedora and other systems that use Dracut

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%