From bf4c3f76d7113047683cd0257b432c5826d51f1e Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Wed, 15 Aug 2012 20:16:49 +0300 Subject: [PATCH] openssh: disable passwotdh auth if set in os.openelec.settings --- packages/network/openssh/init.d/51_sshd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/network/openssh/init.d/51_sshd b/packages/network/openssh/init.d/51_sshd index d8effb1e9c..63c5cf5518 100644 --- a/packages/network/openssh/init.d/51_sshd +++ b/packages/network/openssh/init.d/51_sshd @@ -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 )&