Just a guess but, I recently encountered a situation whereby I had a script login to a number of switches using
- most of which worked, the rest didn't so much hang, as wait for an awfully long timeout before the script 'came back' - the problem was that the prompt was subtly different on some of the switches.