From 62d00c20476d8e25974c2f78ec9c2bd05d8f2412 Mon Sep 17 00:00:00 2001 From: "wu.zhihui" Date: Sat, 22 Oct 2016 11:58:03 +0800 Subject: Remove Qtip private key files in repos 1. Automaticly genegrate private key files. 2. remove the key files in repo at last. 3. remove public key from authorized_keys of compute hosts. JIRA: QTIP-110 Change-Id: Ie22f3f195edf650e690a2ed69df1af191953068f Signed-off-by: wu.zhihui --- scripts/cleanup_creds.sh | 14 ++++++++++++++ scripts/file_permission.sh | 3 --- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 scripts/cleanup_creds.sh delete mode 100755 scripts/file_permission.sh (limited to 'scripts') diff --git a/scripts/cleanup_creds.sh b/scripts/cleanup_creds.sh new file mode 100644 index 00000000..9bf44305 --- /dev/null +++ b/scripts/cleanup_creds.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +DEST_IP=$1 +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" + ;; +esac + + + diff --git a/scripts/file_permission.sh b/scripts/file_permission.sh deleted file mode 100755 index a8af957e..00000000 --- a/scripts/file_permission.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash -chmod 0600 config/QtipKey -chmod 0600 config/QtipKey.pub -- cgit 1.2.3-korg