Hi rleon,
You are currently waiting for the stings:
Code:
"# ","word:","ssh: "
The timeout should be triggered if none of these strings appear for the timeout duration. I believe you're running into a problem where the strings you are waiting for are not specific enough, and are accidentally matching rather than timing out.
With a prompt of "nfs]#", it is possible that you are accidentally matching the string "# " in your ReadString.
Perhaps adding your full prompt to the ReadString and handling the case explicitly will give you better behavior.
Code:
ReadString(["# ","word:","ssh: ", "nfs]#"], 10)
…
…
elif(index == 4):
Does handling the case of finding your prompt explicitly give you the needed functionality?