mirror of
https://github.com/terem42/zfs-hetzner-vm.git
synced 2025-12-22 23:08:36 +00:00
Merge branch 'master' into encr
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/terem42/zfs-hetzner-vm/actions/workflows/shellcheck.yml)
|
[](https://github.com/terem42/zfs-hetzner-vm/actions/workflows/shellcheck.yml)
|
||||||
|
|
||||||
Scripts to install Debian 11, 10 or Ubuntu 18 LTS, 20 LTS, 22 LTS with ZFS root on Hetzner root servers (virtual and dedicated).<br/>
|
Scripts to install Debian 10, 11, 12 or Ubuntu 18 LTS, 20 LTS, 22 LTS with ZFS root on Hetzner root servers (virtual and dedicated).<br/>
|
||||||
__WARNING:__ all data on the disk will be destroyed.
|
__WARNING:__ all data on the disk will be destroyed.
|
||||||
|
|
||||||
## How to use:
|
## How to use:
|
||||||
|
|||||||
@@ -756,32 +756,21 @@ if [[ $v_encrypt_rpool == "1" ]]; then
|
|||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
|
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
mkdir -p "$c_zfs_mount_dir/etc/dropbear/initramfs"
|
||||||
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear/initramfs/authorized_keys"
|
||||||
|
|
||||||
cp "$c_zfs_mount_dir/etc/ssh/ssh_host_rsa_key" "$c_zfs_mount_dir/etc/ssh/ssh_host_rsa_key_temp"
|
cp "$c_zfs_mount_dir/etc/ssh/ssh_host_rsa_key" "$c_zfs_mount_dir/etc/ssh/ssh_host_rsa_key_temp"
|
||||||
chroot_execute "ssh-keygen -p -i -m pem -N '' -f /etc/ssh/ssh_host_rsa_key_temp"
|
chroot_execute "ssh-keygen -p -i -m pem -N '' -f /etc/ssh/ssh_host_rsa_key_temp"
|
||||||
chroot_execute "/usr/lib/dropbear/dropbearconvert openssh dropbear /etc/ssh/ssh_host_rsa_key_temp /etc/dropbear-initramfs/dropbear_rsa_host_key"
|
chroot_execute "/usr/lib/dropbear/dropbearconvert openssh dropbear /etc/ssh/ssh_host_rsa_key_temp /etc/dropbear/initramfs/dropbear_rsa_host_key"
|
||||||
rm -rf "$c_zfs_mount_dir/etc/ssh/ssh_host_rsa_key_temp"
|
rm -rf "$c_zfs_mount_dir/etc/ssh/ssh_host_rsa_key_temp"
|
||||||
|
|
||||||
cp "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key" "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key_temp"
|
cp "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key" "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key_temp"
|
||||||
chroot_execute "ssh-keygen -p -i -m pem -N '' -f /etc/ssh/ssh_host_ecdsa_key_temp"
|
chroot_execute "ssh-keygen -p -i -m pem -N '' -f /etc/ssh/ssh_host_ecdsa_key_temp"
|
||||||
chroot_execute "/usr/lib/dropbear/dropbearconvert openssh dropbear /etc/ssh/ssh_host_ecdsa_key_temp /etc/dropbear-initramfs/dropbear_ecdsa_host_key"
|
chroot_execute "/usr/lib/dropbear/dropbearconvert openssh dropbear /etc/ssh/ssh_host_ecdsa_key_temp /etc/dropbear/initramfs/dropbear_ecdsa_host_key"
|
||||||
chroot_execute "rm -rf /etc/ssh/ssh_host_ecdsa_key_temp"
|
chroot_execute "rm -rf /etc/ssh/ssh_host_ecdsa_key_temp"
|
||||||
rm -rf "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key_temp"
|
rm -rf "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key_temp"
|
||||||
|
|
||||||
rm -rf "$c_zfs_mount_dir/etc/dropbear-initramfs/dropbear_dss_host_key"
|
rm -rf "$c_zfs_mount_dir/etc/dropbear/initramfs/dropbear_dss_host_key"
|
||||||
|
|
||||||
cd "$c_zfs_mount_dir/root"
|
|
||||||
wget http://ftp.de.debian.org/debian/pool/main/libt/libtommath/libtommath1_1.2.0-6_amd64.deb
|
|
||||||
wget http://ftp.de.debian.org/debian/pool/main/d/dropbear/dropbear-bin_2020.81-3_amd64.deb
|
|
||||||
wget http://ftp.de.debian.org/debian/pool/main/d/dropbear/dropbear-initramfs_2020.81-3_all.deb
|
|
||||||
|
|
||||||
chroot_execute "dpkg -i /root/libtommath1_1.2.0-6_amd64.deb"
|
|
||||||
chroot_execute "dpkg -i /root/dropbear-bin_2020.81-3_amd64.deb"
|
|
||||||
chroot_execute "dpkg -i /root/dropbear-initramfs_2020.81-3_all.deb"
|
|
||||||
|
|
||||||
rm $c_zfs_mount_dir/root/*.deb
|
|
||||||
cd /root
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "============setup root prompt============"
|
echo "============setup root prompt============"
|
||||||
|
|||||||
Reference in New Issue
Block a user