This commit is contained in:
Dominik Moritz Roth 2025-08-18 01:37:18 +02:00
parent 97c296da97
commit 10ac0401af

View File

@ -198,7 +198,7 @@ cat > /usr/lib/dracut/modules.d/90tinyssh/module-setup.sh << 'EOF'
#!/bin/bash
check() {
require_binaries tinysshd tinysshd-makekey
require_binaries tinysshd tinysshd-makekey nc
}
depends() {
@ -206,7 +206,7 @@ depends() {
}
install() {
inst_multiple tinysshd tinysshd-makekey
inst_multiple tinysshd tinysshd-makekey nc
inst_dir /etc/tinyssh
@ -234,7 +234,9 @@ cat > /usr/lib/dracut/modules.d/90tinyssh/tinyssh-start.sh << 'EOF'
info "Starting tinyssh SSH server on port 2222..."
[ -d /etc/tinyssh ] || mkdir -p /etc/tinyssh
[ -d /etc/tinyssh/sshkeydir ] || tinysshd-makekey /etc/tinyssh/sshkeydir
tinysshd -p 2222 /etc/tinyssh/sshkeydir &
while true; do
nc -l -p 2222 -e "tinysshd -l /etc/tinyssh/sshkeydir"
done &
EOF
cat > /usr/lib/dracut/modules.d/90tinyssh/unlock-luks.sh << 'EOF'