#!/bin/sh set -- dirs=$HOME p=$HOME while [ "$p" != "${p%/*}" ] do p=${p%/*} dirs="$dirs $p/" done chown root:root $dirs chmod go-w $dirs cmd="/usr/sbin/sshd -D -e -f $HOME/.ssh/sshd_config -h $HOME/.ssh/id_ed25519" /sbin/runuser -u u -- sh -c "set -x; $cmd"