Skip to content

Commit

Permalink
Fixed secure ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
procount committed Feb 11, 2023
1 parent df92752 commit a566dc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions buildroot/package/dropbear/dropbear.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ ifeq ($(BR2_USE_MMU),y)
define DROPBEAR_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
$(TARGET_DIR)/etc/init.d/S50dropbear
$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
$(TARGET_DIR)/etc/S50dropbear
endef
else
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
Expand Down
20 changes: 13 additions & 7 deletions buildroot/package/recovery/init
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ if grep -q vncshare /proc/cmdline; then
export QWS_DISPLAY="VNC:"$QWS_DISPLAY
fi

if grep -q ssh /proc/cmdline; then
# SSH server mode. Mainly useful for debugging
/bin/mkdir -p /dev/pts
/bin/mount -t devpts devpts /dev/pts
. /etc/S50dropbear start &
fi



# Mouse acceleration
Expand Down Expand Up @@ -159,6 +152,19 @@ if ( [ ${SAFE_MODE#*=} -eq 1 ] && ! grep -q disablesafemode /proc/cmdline ) || g
sh
fi

if grep -q ssh /proc/cmdline; then
# SSH server mode. Mainly useful for debugging
/bin/mkdir -p /dev/pts
/bin/mount -t devpts devpts /dev/pts

#This dev needs to be dynamic for USB boot. Replace last partition '1' of pinndriver with '5'
/bin/mount ${pinndrive%?}5 /settings
sleep 1
. /etc/S50dropbear start &
sleep 1
/bin/umount /settings
fi

RUN_INSTALLER=
GPIO_TRIGGER=
KEYBOARD_NO_TRIGGER=
Expand Down

0 comments on commit a566dc9

Please sign in to comment.