aboutsummaryrefslogtreecommitdiff
path: root/board/ssh.sh
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-02-03 08:43:21 +0100
committerSébastien Dailly <sebastien@dailly.me>2023-02-03 08:43:21 +0100
commit58eae3eedcb68e4123c81364d1bf4df879054b22 (patch)
tree055f7ff3447d1dfc1f0312fc8c8b7b97dee85d62 /board/ssh.sh
parentb8c1d2d89c78256483863a15613022beadf4d489 (diff)
Opened ssh access (only with key)
Diffstat (limited to 'board/ssh.sh')
-rw-r--r--board/ssh.sh13
1 files changed, 13 insertions, 0 deletions
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
+