dropbear keygen

This commit is contained in:
Lynn Ochs 2021-03-16 18:54:13 +01:00
parent b2e55cc70d
commit 7b60ff4091
2 changed files with 4 additions and 3 deletions

View File

@ -34,8 +34,7 @@ root_overlay/bin/door.py: door_control/door.py
cp $< $@ cp $< $@
root_overlay/etc/dropbear/dropbear_ecdsa_host_key: root_overlay/etc/dropbear/dropbear_ecdsa_host_key:
mkdir -p `dirname $@` sh -c 'if [[ ! -f $@ && ! -f $@.openssh ]]; then mkdir -p `dirname $@` && ssh-keygen -t ecdsa -f $@.openssh; fi'
ssh-keygen -t ecdsa -f $@
root_overlay/etc/wpa_supplicant/wpa_supplicant.conf: root_overlay/etc/wpa_supplicant/wpa_supplicant.conf:
mkdir -p `dirname $@` mkdir -p `dirname $@`
@ -51,4 +50,4 @@ clean:
menuconfig: menuconfig:
make -C buildroot menuconfig make -C buildroot menuconfig
.PHONY: all clean sdcard.img menuconfig root_overlay .PHONY: all clean sdcard.img menuconfig root_overlay root_overlay/etc/dropbear/dropbear_ecdsa_host_key

View File

@ -0,0 +1,2 @@
#!/bin/sh
[[ ! -f /etc/dropbear/dropbear_ecdsa_host_key && -f /etc/dropbear/host_key ]] && dropbearconvert openssh dropbear /etc/dropbear/host_key /etc/dropbear/dropbear_ecdsa_host_key