Updating onos-secure-ssh to exit if known_hosts cannot be updated
Change-Id: I37865ca37db21ce6fe064676dc6f1bd94abe2044
diff --git a/tools/test/bin/onos-secure-ssh b/tools/test/bin/onos-secure-ssh
index a3980e1..6d898ee 100755
--- a/tools/test/bin/onos-secure-ssh
+++ b/tools/test/bin/onos-secure-ssh
@@ -10,7 +10,8 @@
for node in $nodes; do
# Prune the node entry from the known hosts file since server key changes
- ssh-keygen -f "$HOME/.ssh/known_hosts" -R [$node]:8101
+ ssh-keygen -f "$HOME/.ssh/known_hosts" -R [$node]:8101 ||
+ ( echo "Failed to remove key from known_hosts" >&2 && exit 1 )
# Setup passwordless login for the local user on the remote node
ssh $ONOS_USER@$node "