From 27bc51931cd80724e5638709a7746496cd5151c2 Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Tue, 14 Feb 2017 15:45:41 +0100 Subject: Added draft of post apex deployment script Change-Id: Ib4c4fdfbc9f24f4d6112c110a5fe12be61c40842 Signed-off-by: juraj.linkes --- scripts/copy_keys.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/copy_keys.sh (limited to 'scripts/copy_keys.sh') diff --git a/scripts/copy_keys.sh b/scripts/copy_keys.sh new file mode 100755 index 0000000..062e4a7 --- /dev/null +++ b/scripts/copy_keys.sh @@ -0,0 +1,10 @@ +#!/bin/bash +if [[ $# -ne 1 ]] +then + echo "Must have one argument which is the ip of the host to which the key will be copied" + exit 1 +fi +scp -oStrictHostKeyChecking=no /home/stack/id_rsa_jumphost_root.pub heat-admin@$1:/home/heat-admin +ssh -oStrictHostKeyChecking=no heat-admin@$1 'cat /home/heat-admin/id_rsa_jumphost_root.pub >> /home/heat-admin/.ssh/authorized_keys' +ssh -oStrictHostKeyChecking=no heat-admin@$1 'cat /home/heat-admin/id_rsa_jumphost_root.pub | sudo tee -a /root/.ssh/authorized_keys' +ssh -oStrictHostKeyChecking=no heat-admin@$1 'rm -f /home/heat-admin/id_rsa_jumphost_root.pub' -- cgit 1.2.3-korg