#!/bin/sh exec 2>&1 sv start syslog >/dev/null || exit 1 [ -r /etc/default/ssh ] && . /etc/default/ssh # A read-only root (a snapshot boot) cannot keep host keys, so make them on /run. if [ -z "$SYSCONFDIR" ] && [ ! -w /etc/ssh ]; then SYSCONFDIR=/var/run/ssh SSHD_OPTS="$SSHD_OPTS -f /etc/ssh/sshd_config_readonly" fi export SYSCONFDIR SSHD_OPTS [ ! -e /etc/ssh/sshd_not_to_be_run ] || { sv down .; exit 0; } /usr/libexec/openssh/sshd_check_keys || exit 1 mkdir -p /var/run/sshd && chmod 0755 /var/run/sshd exec /usr/sbin/sshd -D $SSHD_OPTS