Override remote public key with local one
A problem is observed when running stc with same local and remote username.
The public key of local user is overridden by the key of remote user.
As a result, stc cannot login to the remote host.
For now, we let the public key of local user overrides the key of remote user.
But eventually we need a better solution for username collision.
Change-Id: I750fd129a2dcd4920683599b6c562d3beb84e95d
diff --git a/tools/test/bin/onos-secure-ssh b/tools/test/bin/onos-secure-ssh
index 3c15fa3..a3980e1 100755
--- a/tools/test/bin/onos-secure-ssh
+++ b/tools/test/bin/onos-secure-ssh
@@ -9,9 +9,6 @@
nodes=$(env | sort | egrep "OC[0-9]+" | cut -d= -f2)
for node in $nodes; do
- # Setup passwordless login for the remote user on the local bench host
- onos-user-key $node
-
# Prune the node entry from the known hosts file since server key changes
ssh-keygen -f "$HOME/.ssh/known_hosts" -R [$node]:8101
@@ -27,5 +24,10 @@
sleep 1
done
"
+
+ # Setup passwordless login for the remote user on the local bench host
+ # For now, we let the local public key override the remote one
+ # TODO: fix username collision between workbench and the remote hosts
+ onos-user-key $node
done