Eliminating use of Apache Karaf CLI client and of ONOS_USE_SSH env. variable.

All CLI access is now through the raw SSH client.
To enable passwordless access, the 'onos-user-key' tool should be used to add user keys.
Added 'onos-user-password' tool in the similar vein and usage as the 'onos-user-key' tool.

Change-Id: Ic5482fc8012369edc818691402ba45d13f130452
diff --git a/tools/test/bin/onos b/tools/test/bin/onos
index 222ab99..44ba393 100755
--- a/tools/test/bin/onos
+++ b/tools/test/bin/onos
@@ -10,7 +10,7 @@
 
 flags:
 - -w : Waits for ONOS instance to reach run-level 100, i.e. to be fully started.
-- -f : (Affects non-secure client only) - use bash's IFS expansion of positional parameters
+- -f : Deprecated - use bash's IFS expansion of positional parameters
 
 options:
 - [node] : the node to attach to
@@ -30,19 +30,8 @@
 . $ONOS_ROOT/tools/test/bin/find-node.sh
 
 [ "$1" = "-w" ] && shift && onos-wait-for-start $1
-[ "$1" = "-f" ] && shift && flat=1
+[ "$1" = "-f" ] && shift   # Deprecated
 
 [ -n "$1" ] && OCI=$(find_node $1) && shift
 
-if which client 1>/dev/null 2>&1 && [ -z "$ONOS_USE_SSH" ]; then
-    # Use Karaf client only if we can and are allowed to
-    unset KARAF_HOME
-    if [ -z "$flat" ]; then
-        client -h $OCI -u karaf "$@" 2>/dev/null
-    else
-        client -h $OCI -u karaf "$*" 2>/dev/null
-    fi
-else
-    # Otherwise use raw ssh; strict checking is off for dev environments only
-    ssh -p 8101 -o StrictHostKeyChecking=no $OCI "$@"
-fi
+ssh -p 8101 -o StrictHostKeyChecking=no $OCI "$@"
diff --git a/tools/test/bin/onos-check-apps b/tools/test/bin/onos-check-apps
index 55e94f0..f4b21b7 100755
--- a/tools/test/bin/onos-check-apps
+++ b/tools/test/bin/onos-check-apps
@@ -10,11 +10,11 @@
 trap "rm -f $aux $aux.1 $aux.2 2>/dev/null" EXIT
 
 for attempt in {1..30}; do
-    onos ${1:-$OCI} "onos:apps -s -a" | grep -v /bin/client > $aux
+    onos ${1:-$OCI} "onos:apps -s -a" > $aux
     cat $aux
 
     # Normalize the installed apps
-    cut -c7- $aux | grep -v '/bin/client' | cut -d\  -f1 | sort > $aux.1
+    cut -c7- $aux | cut -d\  -f1 | sort > $aux.1
 
     # Normalize the expected apps
     apps=${2:-$ONOS_APPS}
diff --git a/tools/test/bin/onos-check-node-status b/tools/test/bin/onos-check-node-status
index ba86703..39628b8 100755
--- a/tools/test/bin/onos-check-node-status
+++ b/tools/test/bin/onos-check-node-status
@@ -7,7 +7,7 @@
 trap "rm -f $aux 2>/dev/null" EXIT
 
 for attempt in {1..10}; do
-    onos ${1:-$OCI} "onos:nodes" | grep -v /bin/client > $aux
+    onos ${1:-$OCI} "onos:nodes" > $aux
     cat $aux
 
     # Normalize the node status
diff --git a/tools/test/bin/onos-check-nodes b/tools/test/bin/onos-check-nodes
index 69187b6..5433f38 100755
--- a/tools/test/bin/onos-check-nodes
+++ b/tools/test/bin/onos-check-nodes
@@ -6,7 +6,7 @@
 aux=/tmp/stc-$$.log
 trap "rm -f $aux $aux.1 $aux.2 2>/dev/null" EXIT
 
-onos ${1:-$OCI} "onos:nodes" | grep -v /bin/client > $aux
+onos ${1:-$OCI} "onos:nodes" > $aux
 cat $aux
 
 # Normalize the nodes
diff --git a/tools/test/bin/onos-secure-ssh b/tools/test/bin/onos-secure-ssh
index d869c67..24a5a48 100755
--- a/tools/test/bin/onos-secure-ssh
+++ b/tools/test/bin/onos-secure-ssh
@@ -28,7 +28,7 @@
     ssh $ONOS_USER@$node "
         [ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa -f ~/.ssh/id_rsa -P '' -q
         $ONOS_INSTALL_DIR/bin/onos-user-key \$(id -un) \$(cut -d\\  -f2 ~/.ssh/id_rsa.pub)
-        $ONOS_INSTALL_DIR/bin/onos-secure-ssh -u $user -p $password
+        $ONOS_INSTALL_DIR/bin/onos-user-password $user $password
 
         # Implicitly accept the new server key in dev/test environments
         while ! ssh -p 8101 -o StrictHostKeyChecking=no localhost list 2>/dev/null; do
diff --git a/tools/test/bin/onos-user-key b/tools/test/bin/onos-user-key
index b324c1a..df4379f 100755
--- a/tools/test/bin/onos-user-key
+++ b/tools/test/bin/onos-user-key
@@ -1,6 +1,6 @@
 #!/bin/bash
 # -----------------------------------------------------------------------------
-# Adds or removes a user key for managing passwordless loging to ONOS console.
+# Adds or removes a user key for managing passwordless login to ONOS console.
 # -----------------------------------------------------------------------------
 
 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1