Linux Startup
During the startup of Linux, the content of the diot
directory on the second partition on eMMC is copied to the /
. This mechanism can be used e.g. to handle ssh keys on the DIOT board.
Store generated ssh keys permanently
To store generated ssh keys on eMMC type:
mkdir -p /run/media/mmcblk0p2/diot/etc/dropbear
cp /etc/dropbear/dropbear_rsa_host_key /run/media/mmcblk0p2/diot/etc/dropbear/
Using generated keys for login
To use ssh keys from the host machine to login to the DIOT board execute the following commands. On the host machine:
ssh-copy-id root@<diot_board>
On the DIOT board:
mkdir -p /run/media/mmcblk0p2/diot/home/root/.ssh
cp /home/root/.ssh/authorized_keys /run/media/mmcblk0p2/diot/home/root/.ssh