From d693cb2fbb416efe2da1ebac66aac95bc36df3c4 Mon Sep 17 00:00:00 2001 From: Piotr Kubik Date: Wed, 26 Oct 2022 15:57:06 +0200 Subject: [PATCH] iop: ssh_install_key: Disable host key checking This change simplifies ssh key install when connecting to different hosts with same IP address. --- iop/scripts/install_key.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iop/scripts/install_key.sh b/iop/scripts/install_key.sh index 7fddca8cd..762877715 100755 --- a/iop/scripts/install_key.sh +++ b/iop/scripts/install_key.sh @@ -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"