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 /board | |
parent | b8c1d2d89c78256483863a15613022beadf4d489 (diff) |
Opened ssh access (only with key)
Diffstat (limited to 'board')
-rwxr-xr-x | board/post-build.sh | 1 | ||||
-rw-r--r-- | board/ssh.sh | 13 |
2 files changed, 14 insertions, 0 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 + |