Commit 12d57081 authored by erdnaxe's avatar erdnaxe 🦋
Browse files

Dropbear: use UCI to configure

Rather than erasing base-files configuration, now UCI is called to
disable root login with password.
parent a981606a
......@@ -25,12 +25,12 @@ define Package/crans-dropbear
endef
define Package/crans-dropbear/description
This installs Cr@ns authorized ssh keys and disables root login
This installs Cr@ns authorized ssh keys and disables root login via password
endef
define Package/crans-dropbear/conffiles
/etc/dropbear/authorized_keys
/etc/config/dropbear
/etc/uci-defaults/99_crans_dropbear
endef
define Build/Configure
......@@ -40,8 +40,8 @@ define Build/Compile
endef
define Package/crans-dropbear/install
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_DATA) files/dropbear.config $(1)/etc/config/dropbear
$(INSTALL_DIR) $(1)/etc/uci-defaults/
$(INSTALL_DATA) files/dropbear.uci-defaults $(1)/etc/uci-defaults/99_crans_dropbear
install -d -m0700 $(1)/etc/dropbear/
$(INSTALL_CONF) files/authorized_keys $(1)/etc/dropbear/authorized_keys
endef
......
config dropbear
option PasswordAuth 'on'
option RootPasswordAuth 'off'
option Port '22'
# option BannerFile '/etc/banner'
#!/bin/sh
# Disables root login via password
uci -q batch <<-EOF >/dev/null
set dropbear.RootPasswordAuth='off'
commit dropbear
EOF
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment