diff --git a/post-install.sh b/post-install.sh index d52a2cd..4c414f4 100755 --- a/post-install.sh +++ b/post-install.sh @@ -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'