aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-04-05 16:35:29 +0100
committerRoss Burton <ross.burton@intel.com>2013-04-23 11:07:45 +0100
commitb4fe96393912377cd003af8c72557df3448cde86 (patch)
treeeada3a0a050bc32bb84bf3a176ce6e2f439739d9
parentcfdea2a233f3087f51f059c3610a441fbf48e4b0 (diff)
downloadopenembedded-core-b4fe96393912377cd003af8c72557df3448cde86.zip
openembedded-core-b4fe96393912377cd003af8c72557df3448cde86.tar.gz
openembedded-core-b4fe96393912377cd003af8c72557df3448cde86.tar.bz2
qemuimage-testlib: silence some key warnings
Set StrictHostKeyChecking to no to silence the fingerprint warnings, and instead of creating a temporary file for the known hosts and then deleting it just use /dev/null. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/qemuimage-testlib8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 22e2d41..daa1ac0 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -84,13 +84,12 @@ Test_SCP()
local ip_addr=$1
local src=$2
local des=$3
- local tmpfile=`mktemp`
local time_out=60
local ret=0
# We use expect to interactive with target by ssh
local exp_cmd=`cat << EOF
-eval spawn scp -o UserKnownHostsFile=$tmpfile "$src" root@$ip_addr:"$des"
+eval spawn scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$src" root@$ip_addr:"$des"
set timeout $time_out
expect {
"*assword:" { send "\r"; exp_continue}
@@ -107,7 +106,6 @@ EOF`
expect -c "$exp_cmd"
ret=$?
- rm -rf $tmpfile
return $ret
}
@@ -117,11 +115,10 @@ Test_SSH()
local ip_addr=$1
shift
local command=$@
- local tmpfile=`mktemp`
local time_out=60
local ret=0
local exp_cmd=`cat << EOF
-eval spawn ssh -o UserKnownHostsFile=$tmpfile root@$ip_addr "$command"
+eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"
set timeout $time_out
expect {
"*assword:" { send "\r"; exp_continue}
@@ -138,7 +135,6 @@ EOF`
expect -c "$exp_cmd"
ret=$?
- rm -rf $tmpfile
return $ret
}