Commit 392b4955 authored by j38560's avatar j38560

Removed all authorised_keys check when using SSH/ SCP

parent dc43cca7
...@@ -41,7 +41,7 @@ checkTaskStatus(){ ...@@ -41,7 +41,7 @@ checkTaskStatus(){
} }
runRemoteSSH(){ runRemoteSSH(){
ssh -o StrictHostKeyChecking=no -i "$1" [email protected]$TARGET_IP "$2" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i "$1" [email protected]$TARGET_IP "$2"
} }
runRemoteSQL(){ runRemoteSQL(){
......
...@@ -8,5 +8,5 @@ source $ROOT/functions.sh ...@@ -8,5 +8,5 @@ source $ROOT/functions.sh
ssh-keygen -f "/home/gitlab-runner/.ssh/known_hosts" -R $TARGET_IP ssh-keygen -f "/home/gitlab-runner/.ssh/known_hosts" -R $TARGET_IP
# remote setup # remote setup
scp -o StrictHostKeyChecking=no -i $ROOT/../keys/deploykey.private $ROOT/remote/setup_mysql.sh [email protected]$TARGET_IP:/tmp/ scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ROOT/../keys/deploykey.private $ROOT/remote/setup_mysql.sh [email protected]$TARGET_IP:/tmp/
runRemoteSSH "$ROOT/../keys/deploykey.private" 'source /tmp/setup_mysql.sh' runRemoteSSH "$ROOT/../keys/deploykey.private" 'source /tmp/setup_mysql.sh'
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment