iop: ssh_install_key: Disable host key checking

This change simplifies ssh key install
when connecting to different hosts with same IP address.
This commit is contained in:
Piotr Kubik 2022-10-26 15:57:06 +02:00
parent 9cf572e22e
commit d693cb2fbb

View file

@ -48,7 +48,10 @@ function ssh_install_key {
local keys="$(get_ssh_public_keys)"
echo "Adding the following keys to $DROPBEAR_AUTHORIZED_KEYS_FILE on $host:"
echo "$keys"
ssh root@$host "echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
ssh \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
root@$host \
"echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
}
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"