Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinyssh-initramfs scripts for debian users #40

Open
blob42 opened this issue Apr 20, 2019 · 4 comments
Open

tinyssh-initramfs scripts for debian users #40

blob42 opened this issue Apr 20, 2019 · 4 comments

Comments

@blob42
Copy link

blob42 commented Apr 20, 2019

Hi,

I looked for an equivalent to mkinitcpio-tinyssh for debian and could not find it anywhere.
I made a quick one using initramfs-tools based on the already existing dropbear hooks and the Arch one.

Sharing it here for future users, feel free to include it in your repo if you wish.

https://git.sp4ke.com/sp4ke/tinyssh-initramfs

@alexmyczko
Copy link

do you also have an /etc/init.d/tinysshd by chance?

@blob42
Copy link
Author

blob42 commented Mar 24, 2021

I'm not sure what you need buy on the main system I'm using a systemd socket+service

@alexmyczko
Copy link

there's no systemd for debian gnu/kfreebsd.

@terefang
Copy link

terefang commented Oct 7, 2021

@alexmyczko you might use this one (requires busybox)

#!/bin/sh
# ***********
if [ ! -e /etc/tinyssh/ed25519.pk ]; then
  mkdir /etc/tinysshd
  tinysshd-makekey /etc/tinysshd
fi
#
case "$1" in
  start)
    echo -n "starting tiny-sshd ... "
    /bin/busybox start-stop-daemon -p /var/run/tinysshd.pid -m -S /bin/busybox -- tcpsvd 0 22 /usr/sbin/tinysshd -v /etc/tinysshd &
    while [ ! -e /var/run/tinysshd.pid ]; do
      echo -n '!'
      sleep 1
    done
    echo '!'
    ;;
  stop)
    echo "stopping tiny-sshd ..."
    /bin/busybox start-stop-daemon -p /var/run/tinysshd.pid -s KILL -K
    ;;
  *) exit 1
    ;;
esac
#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants