1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-12 19:03:42 +01:00

Added known_hosts workaround for ssh tests

This commit is contained in:
deajan 2016-09-02 20:31:49 +02:00
parent 064b3f875b
commit bfbd57490b

View File

@ -1,12 +1,9 @@
#!/usr/bin/env bash
## obackup basic tests suite 2016090203
## obackup basic tests suite 2016090204
#TODO: Must recreate files before each test set
ping localhost
gpg --help
OBACKUP_DIR="$(pwd)"
OBACKUP_DIR=${OBACKUP_DIR%%/dev*}
DEV_DIR="$OBACKUP_DIR/dev"
@ -146,7 +143,11 @@ function SetupSSH {
echo -e 'y\n'| ssh-keygen -t rsa -b 2048 -N "" -f "${HOME}/.ssh/id_rsa_local"
cat "${HOME}/.ssh/id_rsa_local.pub" >> "${HOME}/.ssh/authorized_keys"
chmod 600 "${HOME}/.ssh/authorized_keys"
ls ${HOME}/.ssh -lah
# Add localhost to known hosts so self connect works
if [ -z $(ssh-keygen -F localhost) ]; then
ssh-keyscan -H localhost >> ~/.ssh/known_hosts
fi
}
function oneTimeSetUp () {