# SliTaz package receipt. PACKED_SIZE="56.0K" UNPACKED_SIZE="136.0K" PACKAGE="tinyssh" VERSION="20190101" CATEGORY="security" SHORT_DESC="Light SSH server with key authentication only" MAINTAINER="pascal.bellard@slitaz.org" LICENSE="PublicDomain" TARBALL="$PACKAGE-$VERSION.tar.gz" [ -n "$TARGET" ] || TARGET="i486" DEPENDS="busybox-net" BUILD_DEPENDS="uclibc-cross-compiler-$TARGET" WEB_SITE="https://tinyssh.org/" WGET_URL="https://github.com/janmojzis/tinyssh/archive/$VERSION.tar.gz" CONFIG_FILES="/etc/tinyssh" TAGS="ssh" # Rules to configure and make the package. compile_rules() { make && make DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr $fs/etc/tinyssh cp -a $install/usr/sbin $fs/usr for i in $fs/usr/sbin/tinysshd-*; do ln -f $fs/usr/sbin/tinysshd $i done } # Post message when installing. post_install() { if [ "$STARTDAEMON" = "ON" ]; then grep -q inetd $1/etc/rcS.conf || sed -i 's/^RUN_DAEMONS="/&inetd /' $1/etc/rcS.conf grep -q dropbear $1/etc/inetd.conf || cat >> $1/etc/inetd.conf < $1/etc/tinyssh/sshkeydir/ed25519.pk $PUBKEY EOT dos2unix < $1/etc/tinyssh/sshkeydir/.ed25519.sk $SECKEY EOT chmod 600 $1/etc/tinyssh/sshkeydir/.ed25519.sk if [ "$REMOTEUSERS" ]; then mkdir $1/root/.ssh cat >> $1/root/.ssh/authorized_keys < /dev/null 2>&1 PUBKEY="$(uuencode -m - < /tmp/mktinyssh$$/ed25519.pk)" SECKEY="$(uuencode -m - < /tmp/mktinyssh$$/.ed25519.sk)" fi uudecode - > /tmp/mktinyssh$$/ed25519.pk < /tmp/mktinyssh$$/.ed25519.sk < Start server during boot
Tinyssh use public-key authentication only (no password or hostbased authentication) You should declare the public keys for each remote user
Current public key is
$(tinysshd-printkey /tmp/mktinyssh$$)
Public key
Secret key
EOT rm -rf /tmp/mktinyssh$$ }