Re: delphi - WeOnlyDo Discussion board

Re: delphi (General questions)

by woddrazen, Friday, January 04, 2008, 18:34 (6167 days ago) @ arno

Hi Arno,


Please try something like this in Delphi:
[code]
wodSSHCom1.Connect1;

wodSSHCom1.WaitFor ('regex:[$ #>] $');
wodSSHCom1.DataReady := 0;
memo2.Text := wodSSHCom1.Execute( ls -al + vbLf, 'regex:[$ #>] $');[/code]

Before you execute command using Execute Method you should wait for a prompt to done that. That's why I use WaitFor Method in my code.

More help for WaitFor Method you can find here:
http://www.weonlydo.com/SSH/Help/WODSSHLib~wodSSH~WaitFor.html

When using Execute Method you don't need to call wodSSH Receive Method. Execute Method should return response from server. In your case in memo2.

Let us know how it goes.


Regards,
Drazen


Complete thread: