openssh: dont run ssh per default, there is a security related discussion in http://openelec.tv/forum/20-development-discussion/20259-security-the-dilema-of-the-out-of-the-box-experience . Add 'ssh' to the appendline in our bootloader, or put a file called 'ssh_enable' in /storage/.config or the 'Configfile' Samba share. Both will enable SSH on boot. Add 'progress' to the appendline in bootloader to show the bootprogress without enabled debugging.

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-12-22 20:38:15 +01:00
parent 1ca0f8f8fe
commit 93f3737a94
3 changed files with 57 additions and 43 deletions

View File

@ -52,6 +52,12 @@ NFS_OVERLAY="192.168.1.1:/var/lib/overlay"
bootchart)
BOOTCHART=yes
;;
ssh)
SSH=yes
;;
progress)
PROGRESS=yes
;;
fastboot)
FASTBOOT=yes
;;
@ -80,7 +86,7 @@ NFS_OVERLAY="192.168.1.1:/var/lib/overlay"
fi
progress() {
if test "$DEBUG" = "yes"; then
if test "$PROGRESS" = "yes"; then
echo "### $1 ###"
fi
}

View File

@ -22,7 +22,6 @@
#
# runlevels: openelec, textmode
(
RSA1_KEY="/storage/.cache/ssh/ssh_host_key"
RSA2_KEY="/storage/.cache/ssh/ssh_host_rsa_key"
DSA2_KEY="/storage/.cache/ssh/ssh_host_dsa_key"
@ -30,6 +29,9 @@
KEYGEN="/usr/bin/ssh-keygen"
SSHD="/usr/sbin/sshd"
(
if [ "$SSH" = yes -o -f /storage/.config/ssh_enable ]; then
# Check for the SSH1 RSA key
if [ ! -s $RSA1_KEY ] ; then
progress "SSH: generating SSH1 RSA key"
@ -70,5 +72,5 @@
mkdir -p /var/empty
chmod -R 600 /var/empty
$SSHD
)&
fi
)&

View File

@ -30,6 +30,12 @@
debugging)
DEBUG=yes
;;
ssh)
SSH=yes
;;
progress)
PROGRESS=yes
;;
fastboot)
FASTBOOT=yes
;;
@ -43,7 +49,7 @@
# functions
progress() {
if test "$DEBUG" = yes; then
if test "$PROGRESS" = yes; then
logger -s -t Boot "### $1 ###"
else
logger -t Boot "### $1 ###"