1
# For secret keys that should not be committed
5
export HOME=`mktemp -d`
6
echo "Temporary home: $HOME"
8
# Unfortunately ssh doesn't respect $HOME :-(
9
if [ -d $REALHOME/.ssh ]; then
10
echo "Moving real ~/.ssh out of the day for tests..."
11
mv $REALHOME/.ssh $REALHOME/.ssh.real
14
# Set it to 1 after bootstrap, so that teardown destroys it.
18
chmod 700 $REALHOME/.ssh
19
ssh-keygen -t rsa -N '' -f $REALHOME/.ssh/id_rsa
20
ssh-keygen -t dsa -N '' -f $REALHOME/.ssh/id_dsa
21
cat > $REALHOME/.ssh/config <<END
23
StrictHostKeyChecking no
24
UserKnownHostsFile /dev/null
27
# juju will use $HOME for .ssh too, so we need both.
28
cp -a $REALHOME/.ssh $HOME