i cant believe it was the result of 0 that broke your loop, you can test against this by replacing your tssh command in the loop with "/bin/true" which also returns 0.
regarding style i dont understand why a simple looping shell script needs ruby, perl, seq or jot or any other binary that is not on my *BSD.
you can alternatively use the shells builtin for loop construct, which works at least in ksh, bash:
for ((i=0; $i<=20; i++)); do
tssh "MYBOXES$i"
done