Exit without waiting on ssh-keyscan max retry
@@ -55,6 +55,11 @@ ok=false
wait=2
until ${ok}; do
generate && validate && ok=true || ok=false
+ count=$(($count + 1))
+ if [[ ${count} -eq ${retries} ]]; then
+ echo "ssh-keyscan failed, no more retries left"
+ exit 1
+ fi
sleep ${wait}
count=$(($count + 1))
if [[ ${count} -eq ${retries} ]]; then
