test/nvme: ignore ssh known_hosts when connecting to hotplug VM

Completely ignore known_hosts file in case there's already an
entry for localhost in ~/.ssh/known_hosts.

If the entry is already in place ssh will create a warning:
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
and exit code will be non-zero, thus terminating the test.

Change-Id: I2cc830f5e1242df68726b9e48ab4cbe4dceed5ed
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469236
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Karol Latecki 2019-09-24 13:32:54 +02:00 committed by Ben Walker
parent 94bb0d5456
commit 9ee2e35865

View File

@ -12,7 +12,8 @@ fi
function ssh_vm() {
local shell_restore_x="$( [[ "$-" =~ x ]] && echo 'set -x' )"
set +x
sshpass -p "$password" ssh -o PubkeyAuthentication=no -o StrictHostKeyChecking=no -p 10022 root@localhost "$@"
sshpass -p "$password" ssh -o PubkeyAuthentication=no \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 10022 root@localhost "$@"
$shell_restore_x
}