Merge branch 'openelec-next' of github.com:OpenELEC/OpenELEC.tv into openelec-next

This commit is contained in:
Stephan Raue 2012-08-16 08:32:40 +02:00
commit e75b85176d
3 changed files with 9 additions and 1 deletions

View File

@ -42,4 +42,5 @@
<string id="5020">SSH</string>
<string id="5021">Start ssh server at boot</string>
<string id="5022">Disable password authentication</string>
</strings>

View File

@ -73,5 +73,6 @@
<setting label="5020" type="lsep"/>
<setting type="sep" />
<setting id="SSHD_START" type="bool" label="5021" default="false" />
<setting id="SSHD_DISABLE_PW_AUTH" type="bool" label="5022" default="false" visible="eq(-1,true)"/>
</category>
</settings>

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
)&