Skip to content

Commit

Permalink
Merge pull request #281 from nicolasbock/helpless-newt
Browse files Browse the repository at this point in the history
Also install testkey for lnav
  • Loading branch information
dosaboy authored Dec 12, 2024
2 parents da328b8 + 4437ffb commit 5545a99
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions tools/juju-lnav
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@ install_ssh_key() {
local unit
for unit in $@; do
echo "installing ssh key for ${unit}"
cat ~/.ssh/id_rsa.pub \
| timeout 10 juju ssh ${unit} \
-- sudo tee --append /root/.ssh/authorized_keys
if [[ -f ~/testkey.pub ]]; then
cat ~/testkey.pub \
| timeout 10 juju ssh ${unit} \
-- sudo tee --append /root/.ssh/authorized_keys
else
echo "missing key: ~/testkey.pub"
fi
if [[ -f ~/.ssh/id_rsa.pub ]]; then
cat ~/.ssh/id_rsa.pub \
| timeout 10 juju ssh ${unit} \
-- sudo tee --append /root/.ssh/authorized_keys
else
echo "missing key: ~/.ssh/id_rsa.pub"
fi
done
}

Expand Down

0 comments on commit 5545a99

Please sign in to comment.