From e830f6268d4dab9da9bb47cca15d18a4ac749e8d Mon Sep 17 00:00:00 2001 From: beierlm Date: Tue, 18 Jan 2022 12:52:23 -0500 Subject: [PATCH] Bug 1864 Use private key Changes script to place the private key into the ssh config instead of public key. Fixes bug 1864 Change-Id: I2d5204970ebea62aded6fe125b474032d8fb5d34 Signed-off-by: beierlm --- tools/debug/charmed/generate_ssh_config.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/debug/charmed/generate_ssh_config.sh b/tools/debug/charmed/generate_ssh_config.sh index 6749dd7f..58d06861 100755 --- a/tools/debug/charmed/generate_ssh_config.sh +++ b/tools/debug/charmed/generate_ssh_config.sh @@ -23,10 +23,10 @@ MODULES="lcm pol mon ro nbi" -PUBLIC_KEY=${1:-$HOME/.ssh/id_rsa.pub} -echo "Using $PUBLIC_KEY key." -[ -f $PUBLIC_KEY ] || (echo "$PUBLIC_KEY file does not exist" && exit 1) -PUBLIC_KEY_CONTENT=`cat $PUBLIC_KEY` +PRIVATE_KEY=${1:-$HOME/.ssh/id_rsa} +echo "Using $PRIVATE_KEY key." +[ -f $PRIVATE_KEY ] || (echo "$PRIVATE_KEY file does not exist" && exit 1) +PRIVATE_KEY_CONTENT=`cat $PRIVATE_KEY` mkdir -p ~/.ssh/config.d echo "" | tee ~/.ssh/config.d/osm @@ -40,7 +40,7 @@ for module in $MODULES; do HostName $pod_ip User root # StrictHostKeyChecking no - IdentityFile $PUBLIC_KEY" | tee -a ~/.ssh/config.d/osm + IdentityFile $PRIVATE_KEY" | tee -a ~/.ssh/config.d/osm fi done -- 2.25.1