Re: Receive problem in SSH - WeOnlyDo Discussion board

Re: Receive problem in SSH (General questions)

by wodSupport, Friday, January 13, 2006, 00:51 (6889 days ago) @ Jeff

Jeff,

ok, send you code back.

Your problem is that you blindly send commands. When you login to remote system, you get command prompt, right? You don't know what this prompt look like, but we do have nice regular expression (wodSSH supports that) that catches most command prompts. So I used it.

Look at new sample. When you connect, you wait for command prompt. Then you send command, and then wait for new command prompt. Everything between your Send and Waitfor is returned as result of Waitfor - so you print it.

Hope change helped!
Kreso


Complete thread: