Re: Using wodSSH with PowerShell? - WeOnlyDo Discussion board

Re: Using wodSSH with PowerShell? (General questions)

by Sean, Wednesday, March 14, 2012, 23:29 (4635 days ago) @ wodDamir

Sean,

Can you try regex statement like this: regex:[~$ #>] $ ??

Also, does it work if you set exact prompt that you receive?

Regards,
Damba

Hi Damba,

Ok tried that and still no luck. I also tried specifying just this:

ssh.WaitFor( ~ # )

or

ssh.WaitFor( ~ # )

those didn't work either. I read up on the WaitFor method in your documentation, and see that it takes two parameters - one is mandatory - the string we expect to wait for to indicate we are done collecting data, and then optional, timeout value. If timeout is not specified then it defaults to $ssh.Timeout (which I have tried as 15 seconds to 120 seconds).

So my WaitFor method is essentially timing out and not finding what its looking for I would say... This is odd as it should just find the prompt of the SSH shell surely?

Any other suggestions?

Would giving you remote ssh access to this box help? I really don't mind configuring that because it is a test box at home.

Sean


Complete thread: