Commit 9ee2e358 authored by Karol Latecki's avatar Karol Latecki Committed by Ben Walker
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469236


Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarVitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 94bb0d54
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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
}