@@ -45,8 +45,8 if [ "$ENABLE_INITRAMFS" = true ] ; then | |||
|
45 | 45 | |
|
46 | 46 | if [ "$CRYPTFS_DROPBEAR" = true ]; then |
|
47 | 47 | if [ -n "$CRYPTFS_DROPBEAR_PUBKEY" ] && [ -f "$CRYPTFS_DROPBEAR_PUBKEY" ] ; then |
|
48 |
install_readonly "${CRYPTFS_DROPBEAR_PUBKEY}" "${ETC_DIR}/dropbear-initramfs/id_rsa.pub |
|
|
49 |
cat |
|
|
48 | install_readonly "${CRYPTFS_DROPBEAR_PUBKEY}" "${ETC_DIR}"/dropbear-initramfs/id_rsa.pub | |
|
49 | cat "${ETC_DIR}"/dropbear-initramfs/id_rsa.pub >> "${ETC_DIR}"/dropbear-initramfs/authorized_keys | |
|
50 | 50 | else |
|
51 | 51 | # Create key |
|
52 | 52 | chroot_exec /usr/bin/dropbearkey -t rsa -f /etc/dropbear-initramfs/id_rsa.dropbear |
@@ -55,7 +55,6 if [ "$ENABLE_INITRAMFS" = true ] ; then | |||
|
55 | 55 | chroot_exec /usr/lib/dropbear/dropbearconvert dropbear openssh /etc/dropbear-initramfs/id_rsa.dropbear /etc/dropbear-initramfs/id_rsa |
|
56 | 56 | |
|
57 | 57 | # Get Public Key Part |
|
58 | touch /etc/dropbear-initramfs/id_rsa.pub | |
|
59 | 58 | chroot_exec /usr/bin/dropbearkey -y -f /etc/dropbear-initramfs/id_rsa.dropbear | chroot_exec tee /etc/dropbear-initramfs/id_rsa.pub |
|
60 | 59 | |
|
61 | 60 | # Delete unwanted lines |
@@ -63,14 +62,13 if [ "$ENABLE_INITRAMFS" = true ] ; then | |||
|
63 | 62 | sed -i '/Fingerprint/d' "${ETC_DIR}"/dropbear-initramfs/id_rsa.pub |
|
64 | 63 | |
|
65 | 64 | # Trust the new key |
|
66 |
|
|
|
67 | cat "${ETC_DIR}"/dropbear-initramfs/id_rsa.pub | chroot_exec tee -a "${ETC_DIR}"/dropbear-initramfs/authorized_keys | |
|
65 | cat "${ETC_DIR}"/dropbear-initramfs/id_rsa.pub > "${ETC_DIR}"/dropbear-initramfs/authorized_keys | |
|
68 | 66 | |
|
69 | 67 | # Save Keys - convert with putty from rsa/openssh to puttkey |
|
70 | 68 | cp -f "${ETC_DIR}"/dropbear-initramfs/id_rsa "${BASEDIR}"/dropbear_initramfs_key.rsa |
|
71 | 69 | |
|
72 | #Get unlock script | |
|
73 |
install_exec files/initramfs/crypt_unlock.sh "${ETC_DIR}/initramfs-tools/hooks/crypt_unlock.sh |
|
|
70 | # Get unlock script | |
|
71 | install_exec files/initramfs/crypt_unlock.sh "${ETC_DIR}"/initramfs-tools/hooks/crypt_unlock.sh | |
|
74 | 72 | fi |
|
75 | 73 | else |
|
76 | 74 | # Disable SSHD inside initramfs |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant