Re: Receive problem in SSH (General questions)

by Jasmine, (7110 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

locked

Complete thread: