Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
21 lines
556 B
Plaintext
21 lines
556 B
Plaintext
[ ! -s /etc/dropbear/authorized_keys ] || exit 0
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
|
|
json_init
|
|
json_load "$(cat /etc/board.json)"
|
|
json_select credentials
|
|
json_get_keys keys ssh_authorized_keys
|
|
[ -z "$keys" ] || {
|
|
touch /etc/dropbear/authorized_keys
|
|
uci set dropbear.@dropbear[-1].PasswordAuth='off'
|
|
uci set dropbear.@dropbear[-1].RootPasswordAuth='off'
|
|
}
|
|
json_select ssh_authorized_keys
|
|
for key in $keys; do
|
|
json_get_var val "$key"
|
|
echo "$val" >> /etc/dropbear/authorized_keys
|
|
done
|
|
json_select ..
|
|
json_select ..
|