openssh: disable passwotdh auth if set in os.openelec.settings

This commit is contained in:
Stefan Saraev 2012-08-15 20:16:49 +03:00
parent 7aa2717d06
commit bf4c3f76d7

View File

@ -81,10 +81,16 @@
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
chmod -R 600 /var/empty
$SSHD
eval $SSHD $OPTIONS
fi
)&