From 8aee8ab3de069ffb8b60e9fd94735b8cb65f2dd7 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 18 Aug 2025 01:14:04 +0200 Subject: [PATCH] ffuuuuu --- post-install.sh | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/post-install.sh b/post-install.sh index ec01b9e..f8e05c7 100755 --- a/post-install.sh +++ b/post-install.sh @@ -106,9 +106,6 @@ dnf install -y \ tmux neovim python3-pip \ tree gcc make autoconf automake tar bzip2 || exit 1 -# Install tinyssh-keyconvert -echo "[+] Installing tinyssh-keyconvert..." -pip3 install git+https://github.com/ansemjo/tinyssh-keyconvert.git || echo "WARNING: tinyssh-keyconvert install failed" # Build and install tinyssh from source since AlmaLinux doesn't package it echo "[+] Installing tinyssh from source..." @@ -118,8 +115,8 @@ tar xf 20250126.tar.gz || exit 1 cd tinyssh-20250126 || exit 1 make || exit 1 make install PREFIX=/usr/local || exit 1 -ln -sf /usr/local/bin/tinysshd /usr/bin/tinysshd -ln -sf /usr/local/bin/tinyssh-keyconvert /usr/bin/tinyssh-keyconvert +ln -sf /usr/local/sbin/tinysshd /usr/bin/tinysshd +ln -sf /usr/local/sbin/tinysshd-makekey /usr/bin/tinysshd-makekey # Install lsd and bat echo "[+] Installing lsd and bat..." @@ -189,7 +186,7 @@ fi # Enable Clevis for early boot echo "[+] Enabling Clevis for early boot..." -systemctl enable clevis-luks-askpass.path || echo "WARNING: clevis-luks-askpass.path not found, may be enabled by default in AlmaLinux 9.1+" +systemctl enable clevis-luks-askpass.path || true # Configure tinyssh for remote unlock echo "[+] Configuring tinyssh for remote unlock..." @@ -260,17 +257,7 @@ echo "${SSH_KEY}" > /etc/tinyssh/authorized_keys chmod 600 /etc/tinyssh/authorized_keys # Generate host keys using tinyssh directly -/usr/local/bin/tinysshd-makekey /etc/tinyssh/sshkeydir || { - echo "WARNING: Failed to generate tinyssh keys, falling back to OpenSSH conversion" - ssh-keygen -A - if command -v tinyssh-keyconvert >/dev/null 2>&1; then - for key in /etc/ssh/ssh_host_*_key; do - [ -f "$key" ] && tinyssh-keyconvert "$key" /etc/tinyssh/sshkeydir/ - done - else - echo "ERROR: tinyssh-keyconvert not available and tinysshd-makekey failed" - fi -} +tinysshd-makekey /etc/tinyssh/sshkeydir # Configure dracut cat > /etc/dracut.conf.d/99-tinyssh.conf << 'EOF'