Keep ssh sessions alive

This commit is contained in:
butomo1989 2018-11-22 12:17:17 +01:00
parent 84ed95aac1
commit 033be6d7c4

View file

@ -261,7 +261,7 @@ _EOF
echo "Connect to adb remotely" echo "Connect to adb remotely"
for ((i=index;i>=1;i--)); do for ((i=index;i>=1;i--)); do
dns=$(./terraform output public_dns_$i) 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--)) ((port--))
time_sleep=$((time_sleep+interval_sleep)) time_sleep=$((time_sleep+interval_sleep))
done done