From 033be6d7c4b00399120e9dc481d590da7ba5377c Mon Sep 17 00:00:00 2001 From: butomo1989 Date: Thu, 22 Nov 2018 12:17:17 +0100 Subject: [PATCH] Keep ssh sessions alive --- src/appium.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appium.sh b/src/appium.sh index 481e3c1..60e490f 100644 --- a/src/appium.sh +++ b/src/appium.sh @@ -261,7 +261,7 @@ _EOF echo "Connect to adb remotely" for ((i=index;i>=1;i--)); do dns=$(./terraform output public_dns_$i) - ((sleep ${interval_sleep} && adb connect localhost:${port}) > /dev/null & ssh -i ~/.ssh/id_rsa -oStrictHostKeyChecking=no -q -NL ${port}:localhost:5555 shell@${dns}) & + ((sleep ${interval_sleep} && adb connect localhost:${port}) > /dev/null & ssh -i ~/.ssh/id_rsa -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -q -NL ${port}:localhost:5555 shell@${dns}) & ((port--)) time_sleep=$((time_sleep+interval_sleep)) done