diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2023-02-03 08:43:21 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2023-02-03 08:43:21 +0100 |
commit | 58eae3eedcb68e4123c81364d1bf4df879054b22 (patch) | |
tree | 055f7ff3447d1dfc1f0312fc8c8b7b97dee85d62 | |
parent | b8c1d2d89c78256483863a15613022beadf4d489 (diff) |
Opened ssh access (only with key)
-rwxr-xr-x | board/post-build.sh | 1 | ||||
-rw-r--r-- | board/ssh.sh | 13 | ||||
-rw-r--r-- | configs/config | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/board/post-build.sh b/board/post-build.sh index 5501359..c41c3a5 100755 --- a/board/post-build.sh +++ b/board/post-build.sh @@ -19,6 +19,7 @@ sed -ie '/^\/dev\/root/ s/rw 0 1/ro 0 0/' "${TARGET_DIR}/etc/fstab" . "${BR2_EXTERNAL_PIAUDIO_PATH}/board/pulseaudio.sh" . "${BR2_EXTERNAL_PIAUDIO_PATH}/board/bluetooth.sh" . "${BR2_EXTERNAL_PIAUDIO_PATH}/board/mpd.sh" +. "${BR2_EXTERNAL_PIAUDIO_PATH}/board/ssh.sh" mkdir -p "${TARGET_DIR}"/etc/systemd/system/getty.target.wants # Add a console on ttyAMA0 and enable auto login diff --git a/board/ssh.sh b/board/ssh.sh new file mode 100644 index 0000000..12ed66d --- /dev/null +++ b/board/ssh.sh @@ -0,0 +1,13 @@ +# Add dropbear +if [ -d "$BR2_EXTERNAL_PIAUDIO_PATH/local/dropbear" ]; then + if [ -L ${TARGET_DIR}/etc/dropbear ]; then + rm ${TARGET_DIR}/etc/dropbear + fi + mkdir -p "${TARGET_DIR}"/etc/dropbear/ + cat "$BR2_EXTERNAL_PIAUDIO_PATH/local/dropbear/dropbear_ecdsa_host_key" > "${TARGET_DIR}/etc/dropbear/dropbear_ecdsa_host_key" + cat "$BR2_EXTERNAL_PIAUDIO_PATH/local/dropbear/dropbear_ed25519_host_key" > "${TARGET_DIR}/etc/dropbear/dropbear_ed25519_host_key" + mkdir -p "${TARGET_DIR}/root/.ssh" + cat "$BR2_EXTERNAL_PIAUDIO_PATH/local/dropbear/authorized_keys" > "${TARGET_DIR}/root/.ssh/authorized_keys" + chmod 600 "${TARGET_DIR}/root/.ssh/authorized_keys" +fi + diff --git a/configs/config b/configs/config index c044e2f..ff929a5 100644 --- a/configs/config +++ b/configs/config @@ -16,7 +16,7 @@ BR2_INIT_SYSTEMD=y BR2_ROOTFS_MERGED_USR=y BR2_TARGET_ENABLE_ROOT_LOGIN=y -BR2_TARGET_GENERIC_ROOT_PASSWD="root" +#BR2_TARGET_GENERIC_ROOT_PASSWD="root" BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=n BR2_SYSTEM_DHCP="" @@ -138,3 +138,5 @@ BR2_PACKAGE_MPD_BZIP2=y BR2_PACKAGE_MPD_CURL=y BR2_PACKAGE_CA_CERTIFICATES=y BR2_PACKAGE_LIBCURL_CURL=y + +BR2_PACKAGE_DROPBEAR=y |