Skip to content

Commit

Permalink
add ssh authorized_keys to jffs2
Browse files Browse the repository at this point in the history
add ssh authorized_keys to jffs2
Signed-off-by: Jan Mairose <[email protected]>
  • Loading branch information
dj1an authored and commodo committed Jul 2, 2020
1 parent 73ee0ec commit 471fa43
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions board/pluto/device_persistent_keys
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set +e

KEYFILE=/etc/dropbear/dropbear_ecdsa_host_key
IDFILE=/root/.ssh/authorized_keys

cat /proc/mounts | grep -q mtd2 || (echo "Filesystem not mounted use device_format_jffs2 command to setup your partition"; exit 1)

Expand All @@ -11,5 +12,8 @@ install -D ${KEYFILE} -t /mnt/jffs2/etc/dropbear
cd /etc/dropbear
md5sum dropbear* /etc/dropbear/ 2>/dev/null > /mnt/jffs2/etc/dropbear/keys.md5



if [ -f ${IDFILE} ]; then
install -D ${IDFILE} -t /mnt/jffs2/root/.ssh
cd /root/.ssh
md5sum authorized_keys 2>/dev/null > /mnt/jffs2/root/.ssh/keys.md5
fi

0 comments on commit 471fa43

Please sign in to comment.