summaryrefslogtreecommitdiffstats
path: root/qtip/scripts/cleanup_creds.sh
diff options
context:
space:
mode:
Diffstat (limited to 'qtip/scripts/cleanup_creds.sh')
-rwxr-xr-xqtip/scripts/cleanup_creds.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/qtip/scripts/cleanup_creds.sh b/qtip/scripts/cleanup_creds.sh
index b4eee924..1a7ddc1a 100755
--- a/qtip/scripts/cleanup_creds.sh
+++ b/qtip/scripts/cleanup_creds.sh
@@ -1,11 +1,20 @@
#! /bin/bash
+##############################################################################
+# Copyright (c) 2017 ZTE corp. and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
DEST_IP=$1
+PRIVATE_KEY=$2
HOSTNAME=$(hostname)
sshoptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
case "$INSTALLER_TYPE" in
fuel)
- ssh $sshoptions -i ./config/QtipKey root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys"
+ ssh $sshoptions -i $PRIVATE_KEY root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys"
;;
esac