diff --git a/bin/functions.sh b/bin/functions.sh index 9ee3dfc2e3ea2d383e7975dfeb2cdbba0187b691..9b0d85e1e929b95c529fe7351d92563b6df6f128 100644 --- a/bin/functions.sh +++ b/bin/functions.sh @@ -41,7 +41,7 @@ checkTaskStatus(){ } runRemoteSSH(){ - ssh -o StrictHostKeyChecking=no -i "$1" root@$TARGET_IP "$2" + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "$1" root@$TARGET_IP "$2" } runRemoteSQL(){ diff --git a/bin/install_environment.sh b/bin/install_environment.sh index e3a3c514038e01f05a0da74020eb3486cb500555..4043f7da836a95a062e33c7730d4bb5d6d9b04ab 100644 --- a/bin/install_environment.sh +++ b/bin/install_environment.sh @@ -8,5 +8,5 @@ source $ROOT/functions.sh ssh-keygen -f "/home/gitlab-runner/.ssh/known_hosts" -R $TARGET_IP # remote setup -scp -o StrictHostKeyChecking=no -i $ROOT/../keys/deploykey.private $ROOT/remote/setup_mysql.sh root@$TARGET_IP:/tmp/ -runRemoteSSH "$ROOT/../keys/deploykey.private" 'source /tmp/setup_mysql.sh' +scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ROOT/../keys/deploykey.private $ROOT/remote/setup_mysql.sh root@$TARGET_IP:/tmp/ +runRemoteSSH "$ROOT/../keys/deploykey.private" 'source /tmp/setup_mysql.sh' \ No newline at end of file