Remove opnfv vm from known_hosts 83/53883/1
authorFatih Degirmenci <fdegir@gmail.com>
Thu, 15 Mar 2018 14:32:40 +0000 (15:32 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Thu, 15 Mar 2018 14:32:40 +0000 (15:32 +0100)
Change-Id: If53b51fc26d642afa39c5e618afcd23fab395acc
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
xci/scripts/vm/start-new-vm.sh

index 7650683..ec0edee 100755 (executable)
@@ -259,9 +259,9 @@ done
 # Fix up perms if needed to make ssh happy
 chmod 600 ${BASE_PATH}/xci/scripts/vm/id_rsa_for_dib*
 # Remove it from known_hosts
-ssh-keygen -R $_ip || true
-ssh-keygen -R ${VM_NAME} || true
-ssh-keygen -R ${OPNFV_VM_IP} || true
+for item in $_ip ${VM_NAME} ${OPNFV_VM_IP} ${VM_NAME}_opnfv; do
+    ssh-keygen -R $item || true
+done
 
 # Initial ssh command until we setup everything
 vm_ssh="ssh -o StrictHostKeyChecking=no -i ${BASE_PATH}/xci/scripts/vm/id_rsa_for_dib -l devuser"