V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m18s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m18s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -45,8 +45,10 @@ dropbear_setup() {
|
||||
### Prepare strong dropbear host keys.
|
||||
rm -f "${TARGET}"/etc/dropbear/initramfs/dropbear*key*
|
||||
|
||||
chroot_exec "${TARGET}" /usr/bin/dropbearkey -t rsa -s 4096 -f /etc/dropbear/initramfs/dropbear_rsa_host_key -C "root@${VAR_FINAL_FQDN}"
|
||||
chroot_exec "${TARGET}" /usr/bin/dropbearkey -t ed25519 -f /etc/dropbear/initramfs/dropbear_ed25519_host_key -C "root@${VAR_FINAL_FQDN}"
|
||||
# shellcheck disable=SC2312
|
||||
chroot_exec "${TARGET}" /usr/bin/dropbearkey -t rsa -s 4096 -f /etc/dropbear/initramfs/dropbear_rsa_host_key -C "root@${VAR_FINAL_FQDN}-$(date -I)"
|
||||
# shellcheck disable=SC2312
|
||||
chroot_exec "${TARGET}" /usr/bin/dropbearkey -t ed25519 -f /etc/dropbear/initramfs/dropbear_ed25519_host_key -C "root@${VAR_FINAL_FQDN}-$(date -I)"
|
||||
|
||||
chmod 0600 "${TARGET}"/etc/dropbear/initramfs/dropbear*key*
|
||||
chown root:root "${TARGET}"/etc/dropbear/initramfs/dropbear*key*
|
||||
|
||||
@@ -53,11 +53,20 @@ installation_ssh() {
|
||||
|
||||
rm -rf "${TARGET}"/etc/ssh/ssh_host_*key*
|
||||
|
||||
#shellcheck disable=SC2312
|
||||
if [[ -f "${TARGET}/etc/dropbear/initramfs/dropbear_rsa_host_key" ]]; then
|
||||
|
||||
cp -a "${TARGET}/etc/dropbear/initramfs/dropbear_ed25519_host_key" "${TARGET}/etc/ssh/ssh_host_ed25519_key"
|
||||
cp -a "${TARGET}/etc/dropbear/initramfs/dropbear_rsa_host_key" "${TARGET}/etc/ssh/ssh_host_rsa_key"
|
||||
|
||||
else
|
||||
|
||||
# shellcheck disable=SC2312
|
||||
chroot_exec "${TARGET}" ssh-keygen -o -N "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -C "root@${VAR_FINAL_FQDN}-$(date -I)"
|
||||
#shellcheck disable=SC2312
|
||||
# shellcheck disable=SC2312
|
||||
chroot_exec "${TARGET}" ssh-keygen -o -N "" -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key -C "root@${VAR_FINAL_FQDN}-$(date -I)"
|
||||
|
||||
fi
|
||||
|
||||
mkdir -p "${TARGET}/root/.ciss/cdi/backup/etc/ssh"
|
||||
cp "${TARGET}/etc/ssh/sshd_config" "${TARGET}/root/.ciss/cdi/backup/etc/ssh/sshd_config.bak"
|
||||
cp "${TARGET}/etc/ssh/ssh_config" "${TARGET}/root/.ciss/cdi/backup/etc/ssh/ssh_config.bak"
|
||||
|
||||
@@ -237,7 +237,7 @@ EOF
|
||||
tmp_sudo="user_user${i}_privileges_sudo"
|
||||
tmp_system="user_user${i}_privileges_system"
|
||||
tmp_restricted="user_user${i}_privileges_restricted"
|
||||
tmp_specific="user_user${i}_privileges_restricted"
|
||||
tmp_specific="user_user${i}_specific"
|
||||
|
||||
var_username="${!tmp_username}"
|
||||
var_fullname="${!tmp_fullname}"
|
||||
|
||||
Reference in New Issue
Block a user