diff --git a/packages/network/openssh/init.d/51_sshd b/packages/network/openssh/init.d/51_sshd index 64d0e41863..1b2c4eecfa 100644 --- a/packages/network/openssh/init.d/51_sshd +++ b/packages/network/openssh/init.d/51_sshd @@ -22,8 +22,17 @@ # # runlevels: openelec, textmode - if [ -f /storage/.cache/openelec/sshd.conf ]; then - . /storage/.cache/openelec/sshd.conf + if [ -f /etc/sshd.conf ]; then + . /etc/sshd.conf + elif [ -f /storage/.config/sshd.conf ]; then + . /storage/.config/sshd.conf + fi + +# Check if password authentication is disabled + OPTIONS="" + + if [ "$SSHD_DISABLE_PW_AUTH" == "true" ] ; then + OPTIONS="-o 'PasswordAuthentication no'" fi RSA1_KEY="/storage/.cache/ssh/ssh_host_key" @@ -36,11 +45,7 @@ HOME="/storage" ( - if [ -f /etc/ssh.conf ]; then - . /etc/ssh.conf - fi - - if [ "$SSH" = yes -o -f /storage/.config/ssh_enable -o "$SSHD_START" == "true" ]; then + if [ "$SSH" = "yes" -o "$SSHD_START" = "true" ]; then # Check for the SSH1 RSA key if [ ! -s $RSA1_KEY ] ; then @@ -81,12 +86,6 @@ cp /etc/ssh/known_hosts $HOME/.ssh fi - # Check if password authentication is disabled - OPTIONS="" - - if [ "$SSHD_DISABLE_PW_AUTH" == "true" ] ; then - OPTIONS="-o 'PasswordAuthentication no'" - fi progress "Starting SSH Server" mkdir -p /var/empty