feat(zbm): Define Dropbear's SSH pub keys (#6)
This commit is contained in:
parent
732cc47405
commit
1690518197
11
setup.sh
11
setup.sh
@ -809,6 +809,17 @@ function ensure_ip_in_kcl () {
|
|||||||
yq -i '.Kernel.CommandLine = "'"${new_kcl}"'"' "${zbm_config}"
|
yq -i '.Kernel.CommandLine = "'"${new_kcl}"'"' "${zbm_config}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function set_pub_keys () {
|
||||||
|
local authorized_keys_file raw_pub_keys
|
||||||
|
authorized_keys_file="${1:?}"
|
||||||
|
raw_pub_keys="${2:?}"
|
||||||
|
:> "${authorized_keys_file}"
|
||||||
|
while IFS= read -r pub_key_line; do
|
||||||
|
printf -- '%s\n' "${pub_key_line}" >> "${authorized_keys_file}"
|
||||||
|
done < <(<<<"${raw_pub_keys}" sed -r -e 's/,,/\n/g')
|
||||||
|
sed -i '/^$/d' "${authorized_keys_file}"
|
||||||
|
}
|
||||||
|
|
||||||
function we_want_ssh () {
|
function we_want_ssh () {
|
||||||
#2.10
|
#2.10
|
||||||
if [[ "${ARCHZBM_NET_CLIENT_IP}" ]] || \
|
if [[ "${ARCHZBM_NET_CLIENT_IP}" ]] || \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user